summaryrefslogtreecommitdiff
path: root/tests/regressiontests/templates/tests.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-08-25 04:52:55 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-08-25 04:52:55 +0000
commitc46bb219bfd5cab84e20fc9e87238093d36ecf52 (patch)
tree7e1549706abbc2b808876afcbc803d5e78cd8709 /tests/regressiontests/templates/tests.py
parent29d216021375446223a36901ab0ec60b6e3eadf9 (diff)
Fixed #7460 -- Made the "cache" template tag always generate keys that can be
used with the memcache backend (which has the strongest restriction on keys). Based on a patch from trbs. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8533 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/templates/tests.py')
-rw-r--r--tests/regressiontests/templates/tests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index 96e1d662c6..0eb5a2a586 100644
--- a/tests/regressiontests/templates/tests.py
+++ b/tests/regressiontests/templates/tests.py
@@ -917,6 +917,9 @@ class Templates(unittest.TestCase):
'cache14': ('{% load cache %}{% cache foo bar %}{% endcache %}', {'foo': 'fail'}, template.TemplateSyntaxError),
'cache15': ('{% load cache %}{% cache foo bar %}{% endcache %}', {'foo': []}, template.TemplateSyntaxError),
+ # Regression test for #7460.
+ 'cache16': ('{% load cache %}{% cache 1 foo bar %}{% endcache %}', {'foo': 'foo', 'bar': 'with spaces'}, ''),
+
### AUTOESCAPE TAG ##############################################
'autoescape-tag01': ("{% autoescape off %}hello{% endautoescape %}", {}, "hello"),
'autoescape-tag02': ("{% autoescape off %}{{ first }}{% endautoescape %}", {"first": "<b>hello</b>"}, "<b>hello</b>"),