summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2007-03-27 17:25:56 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2007-03-27 17:25:56 +0000
commitd6fd9fb22bdbc6939fbe97c6e0571b8002d014c6 (patch)
treeeef5c47d38ed97cbebefc1b1f92a3aa7f0d41b30 /tests
parent750ea554c12b34f7b68653488f345f4066191e08 (diff)
Fixed #3826: added a {% with %}. Thanks, SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4830 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/templates/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index 375fd36196..967767ee50 100644
--- a/tests/regressiontests/templates/tests.py
+++ b/tests/regressiontests/templates/tests.py
@@ -650,6 +650,10 @@ class Templates(unittest.TestCase):
'widthratio09': ('{% widthratio a b %}', {'a':50,'b':100}, template.TemplateSyntaxError),
'widthratio10': ('{% widthratio a b 100.0 %}', {'a':50,'b':100}, template.TemplateSyntaxError),
+ ### WITH TAG ########################################################
+ 'with01': ('{% with dict.key as key %}{{ key }}{% endwith %}', {'dict': {'key':50}}, '50'),
+ 'with02': ('{{ key }}{% with dict.key as key %}{{ key }}-{{ dict.key }}-{{ key }}{% endwith %}{{ key }}', {'dict': {'key':50}}, ('50-50-50', 'INVALID50-50-50INVALID')),
+
### NOW TAG ########################################################
# Simple case
'now01' : ('{% now "j n Y"%}', {}, str(datetime.now().day) + ' ' + str(datetime.now().month) + ' ' + str(datetime.now().year)),