1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #24119, #24120 -- Formalized debug integration for template backends.

This commit is contained in:
Preston Timmons
2015-04-24 14:33:03 -05:00
parent d1df1fd2bb
commit adff499e47
14 changed files with 354 additions and 63 deletions

View File

@@ -37,8 +37,9 @@ class TemplateStringsTests(SimpleTestCase):
self.assertEqual(content, "Hello world!\n")
def test_get_template_non_existing(self):
with self.assertRaises(TemplateDoesNotExist):
with self.assertRaises(TemplateDoesNotExist) as e:
self.engine.get_template('template_backends/non_existing.html')
self.assertEqual(e.exception.backend, self.engine)
def test_get_template_syntax_error(self):
# There's no way to trigger a syntax error with the dummy backend.