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 11:35:40 +0100
commit73e7bfc8f51a68c89c4dacc7bd52072bebcabb2c (patch)
treef37ffd02e92d3bd32b27fde8573e41f9f2d1b7ff /tests/template_tests/test_extends_relative.py
parent4dbbe3747955cbecbf3668c93a0c885562f063ac (diff)
[3.2.x] Fixed #32290 -- Fixed TemplateNotFound in {% include %} tag for relative path in variable.
Backport of c978dd93fda87c6d2e965d385164c35f1a3e64b8 from master
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 12324f0df6..f797ae1a1a 100644
--- a/tests/template_tests/test_extends_relative.py
+++ b/tests/template_tests/test_extends_relative.py
@@ -64,6 +64,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')