diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-09-29 04:22:09 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-09-29 04:22:09 +0000 |
| commit | 8a7189f38f08c515e7302a484d7af0c215e92973 (patch) | |
| tree | 5b54cac70f13262798a42e14b49d7b23bdc5cd26 /tests | |
| parent | 26021249a4e188d855732d800d94f049488e672b (diff) | |
Fixed #501 -- Fixed block.super in multi-level templates, and added unit tests to confirm. Thanks for the patch, django@kieranholland.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/othertests/templates.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/othertests/templates.py b/tests/othertests/templates.py index 07b41f5b10..31fea0e1ba 100644 --- a/tests/othertests/templates.py +++ b/tests/othertests/templates.py @@ -185,6 +185,18 @@ TEMPLATE_TESTS = { # {% load %} tag (within a child template) 'inheritance19': ("{% extends 'inheritance01' %}{% block first %}{% load testtags %}{% echo 400 %}5678{% endblock %}", {}, '140056783_'), + # Two-level inheritance with {{ block.super }} + 'inheritance20': ("{% extends 'inheritance01' %}{% block first %}{{ block.super }}a{% endblock %}", {}, '1_a3_'), + + # Three-level inheritance with {{ block.super }} from parent + 'inheritance21': ("{% extends 'inheritance02' %}{% block first %}{{ block.super }}a{% endblock %}", {}, '12a34'), + + # Three-level inheritance with {{ block.super }} from grandparent + 'inheritance22': ("{% extends 'inheritance04' %}{% block first %}{{ block.super }}a{% endblock %}", {}, '1_a3_'), + + # Three-level inheritance with {{ block.super }} from parent and grandparent + 'inheritance23': ("{% extends 'inheritance20' %}{% block first %}{{ block.super }}b{% endblock %}", {}, '1_ab3_'), + ### EXCEPTIONS ############################################################ # Raise exception for invalid template name |
