mirror of https://github.com/django/django.git
Refs #32290 -- Added {% extends %} test for relative path in variable.
This commit is contained in:
parent
f4272d000a
commit
640a6e1dce
|
@ -0,0 +1,3 @@
|
|||
{% extends tmpl %}
|
||||
|
||||
{% block content %}{{ block.super }} one{% endblock %}
|
|
@ -16,6 +16,12 @@ class ExtendsRelativeBehaviorTests(SimpleTestCase):
|
|||
output = template.render(Context({}))
|
||||
self.assertEqual(output.strip(), 'three two one')
|
||||
|
||||
def test_normal_extend_variable(self):
|
||||
engine = Engine(dirs=[RELATIVE])
|
||||
template = engine.get_template('one_var.html')
|
||||
output = template.render(Context({'tmpl': './two.html'}))
|
||||
self.assertEqual(output.strip(), 'three two one')
|
||||
|
||||
def test_dir1_extend(self):
|
||||
engine = Engine(dirs=[RELATIVE])
|
||||
template = engine.get_template('dir1/one.html')
|
||||
|
|
Loading…
Reference in New Issue