diff options
Diffstat (limited to 'tests/template_tests/syntax_tests/test_include.py')
| -rw-r--r-- | tests/template_tests/syntax_tests/test_include.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/template_tests/syntax_tests/test_include.py b/tests/template_tests/syntax_tests/test_include.py index f1fee7d227..6dac87b7f2 100644 --- a/tests/template_tests/syntax_tests/test_include.py +++ b/tests/template_tests/syntax_tests/test_include.py @@ -1,6 +1,7 @@ from django.template import ( Context, Engine, TemplateDoesNotExist, TemplateSyntaxError, loader, ) +from django.template.loader_tags import IncludeNode from django.test import SimpleTestCase from ..utils import setup @@ -314,3 +315,12 @@ class IncludeTests(SimpleTestCase): ], libraries={'custom': 'template_tests.templatetags.custom'}) output = engine.render_to_string('template', {'vars': range(9)}) self.assertEqual(output, '012345678') + + +class IncludeNodeTests(SimpleTestCase): + def test_repr(self): + include_node = IncludeNode('app/template.html') + self.assertEqual( + repr(include_node), + "<IncludeNode: template='app/template.html'>", + ) |
