summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/template_tests/tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/template_tests/tests.py b/tests/template_tests/tests.py
index 43cc182008..ff0b29073f 100644
--- a/tests/template_tests/tests.py
+++ b/tests/template_tests/tests.py
@@ -140,3 +140,12 @@ class TemplateTests(SimpleTestCase):
child = engine.from_string(
'{% extends parent %}{% block content %}child{% endblock %}')
self.assertEqual(child.render(Context({'parent': parent})), 'child')
+
+ def test_node_origin(self):
+ """
+ #25848 -- Set origin on Node so debugging tools can determine which
+ template the node came from even if extending or including templates.
+ """
+ template = Engine().from_string('content')
+ for node in template.nodelist:
+ self.assertEqual(node.origin, template.origin)