mirror of
https://github.com/django/django.git
synced 2025-10-30 17:16:10 +00:00
Fixed #18807 -- Made 404.html and 500.html optional
Thanks Aymeric Augustin for the report and Jannis Leidel for the review.
This commit is contained in:
@@ -229,11 +229,11 @@ class Templates(unittest.TestCase):
|
||||
loader.template_source_loaders = (filesystem.Loader(),)
|
||||
|
||||
# We rely on the fact that runtests.py sets up TEMPLATE_DIRS to
|
||||
# point to a directory containing a 404.html file. Also that
|
||||
# point to a directory containing a login.html file. Also that
|
||||
# the file system and app directories loaders both inherit the
|
||||
# load_template method from the BaseLoader class, so we only need
|
||||
# to test one of them.
|
||||
load_name = '404.html'
|
||||
load_name = 'login.html'
|
||||
template = loader.get_template(load_name)
|
||||
template_name = template.nodelist[0].source[0].name
|
||||
self.assertTrue(template_name.endswith(load_name),
|
||||
|
||||
Reference in New Issue
Block a user