summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2016-07-22 17:38:35 -0700
committerMarkus Holtermann <info@markusholtermann.eu>2016-07-24 18:25:43 +0200
commitc0026a9d2dc2cdf4da583845fc1d9ae8402a984c (patch)
treef8933b8c4eee7401eb82f35ae9586858bd631b09 /tests
parentff56d6c02350201e77ba31ecb9cf917b751fd63f (diff)
[1.10.x] Fixed #26938 -- Fixed invalid HTML in template postmortem on the debug page.
Backport of 348cfccd9072f0e08ffe4cfb3946d1dc6a629e86 from master
Diffstat (limited to 'tests')
-rw-r--r--tests/view_tests/tests/test_debug.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py
index 11ecc4c8d4..714723c957 100644
--- a/tests/view_tests/tests/test_debug.py
+++ b/tests/view_tests/tests/test_debug.py
@@ -169,6 +169,14 @@ class DebugViewTests(LoggingCaptureMixin, SimpleTestCase):
}]):
response = self.client.get(reverse('raises_template_does_not_exist', kwargs={"path": template_name}))
self.assertContains(response, "%s (Source does not exist)" % template_path, status_code=500, count=2)
+ # Assert as HTML.
+ self.assertContains(
+ response,
+ '<li><code>django.template.loaders.filesystem.Loader</code>: '
+ '%s (Source does not exist)</li>' % os.path.join(tempdir, 'notfound.html'),
+ status_code=500,
+ html=True,
+ )
def test_no_template_source_loaders(self):
"""