mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.10.x] Fixed #26938 -- Fixed invalid HTML in template postmortem on the debug page.
Backport of 348cfccd90 from master
This commit is contained in:
committed by
Markus Holtermann
parent
ff56d6c023
commit
c0026a9d2d
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user