1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

[1.2.X] Fixed #14818 -- Added explicit tests for the way that the cycle tag handles escaping. Thanks to steveire.

Backport of r15335 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15338 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2011-01-27 02:43:06 +00:00
parent ee29ec62be
commit 81f844afb1

View File

@ -636,6 +636,8 @@ class Templates(unittest.TestCase):
'cycle14': ("{% cycle one two as foo %}{% cycle foo %}", {'one': '1','two': '2'}, '12'),
'cycle15': ("{% for i in test %}{% cycle aye bee %}{{ i }},{% endfor %}", {'test': range(5), 'aye': 'a', 'bee': 'b'}, 'a0,b1,a2,b3,a4,'),
'cycle16': ("{% cycle one|lower two as foo %}{% cycle foo %}", {'one': 'A','two': '2'}, 'a2'),
'cycle20': ("{% cycle one two as foo %} & {% cycle foo %}", {'one' : 'A & B', 'two' : 'C & D'}, "A & B & C & D"),
'cycle21': ("{% filter force_escape %}{% cycle one two as foo %} & {% cycle foo %}{% endfilter %}", {'one' : 'A & B', 'two' : 'C & D'}, "A & B & C & D"),
### EXCEPTIONS ############################################################