diff options
| author | Tim Graham <timograham@gmail.com> | 2017-03-25 08:22:12 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-25 08:22:12 -0400 |
| commit | e643ba8bcf0b1da517cbab689ac157ee031202a3 (patch) | |
| tree | 6d3a1adde6ddd9c621ac722f606257f7ed8b1f74 /tests/template_tests/tests.py | |
| parent | f42c7cc87baa83000624fadc1e434c44efc1fba8 (diff) | |
Fixed #27956 -- Fixed display of errors in an {% extends %} child.
Thanks Ling-Xiao Yang for the report and test, and
Preston Timmons for the fix.
Diffstat (limited to 'tests/template_tests/tests.py')
| -rw-r--r-- | tests/template_tests/tests.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/template_tests/tests.py b/tests/template_tests/tests.py index 3ab215c094..a8f089c351 100644 --- a/tests/template_tests/tests.py +++ b/tests/template_tests/tests.py @@ -122,6 +122,18 @@ class TemplateTests(SimpleTestCase): t.render(Context()) self.assertEqual(e.exception.template_debug['during'], '{% badtag %}') + def test_compile_tag_error_27956(self): + """Errors in a child of {% extends %} are displayed correctly.""" + engine = Engine( + app_dirs=True, + debug=True, + libraries={'tag_27584': 'template_tests.templatetags.tag_27584'}, + ) + t = engine.get_template('27956_child.html') + with self.assertRaises(TemplateSyntaxError) as e: + t.render(Context()) + self.assertEqual(e.exception.template_debug['during'], '{% badtag %}') + def test_super_errors(self): """ #18169 -- NoReverseMatch should not be silence in block.super. |
