summaryrefslogtreecommitdiff
path: root/tests/template_tests/test_extends_relative.py
diff options
context:
space:
mode:
authorHasan Ramezani <hasan.r67@gmail.com>2020-12-27 21:21:59 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-01-27 10:07:31 +0100
commitc978dd93fda87c6d2e965d385164c35f1a3e64b8 (patch)
treef76195ed3d24a889175ba5a5ad730643991c087d /tests/template_tests/test_extends_relative.py
parent640a6e1dce8d91e9cb1f817fadbb37a2c9d294bf (diff)
Fixed #32290 -- Fixed TemplateNotFound in {% include %} tag for relative path in variable.
Diffstat (limited to 'tests/template_tests/test_extends_relative.py')
-rw-r--r--tests/template_tests/test_extends_relative.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/template_tests/test_extends_relative.py b/tests/template_tests/test_extends_relative.py
index 9e8d7fc9b9..49a7624600 100644
--- a/tests/template_tests/test_extends_relative.py
+++ b/tests/template_tests/test_extends_relative.py
@@ -70,6 +70,12 @@ class IncludeRelativeBehaviorTests(SimpleTestCase):
output = template.render(Context({}))
self.assertEqual(output.strip(), 'dir2 include')
+ def test_normal_include_variable(self):
+ engine = Engine(dirs=[RELATIVE])
+ template = engine.get_template('dir1/dir2/inc3.html')
+ output = template.render(Context({'tmpl': './include_content.html'}))
+ self.assertEqual(output.strip(), 'dir2 include')
+
def test_dir2_include(self):
engine = Engine(dirs=[RELATIVE])
template = engine.get_template('dir1/dir2/inc1.html')