summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJustin Bronn <jbronn@gmail.com>2010-02-23 05:17:39 +0000
committerJustin Bronn <jbronn@gmail.com>2010-02-23 05:17:39 +0000
commit349827996b5bcf29886bd1e57bc07147d840229e (patch)
tree78895196c463f7d194ef139d262b6c3b8e15b157 /tests
parent6ed7bd5609d298858c02d5d3b6357b434df06d9f (diff)
Fixed #12072 -- Certain characters no longer break url tag. Thanks, Alexander Dutton.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12503 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/templates/tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index 22e4e45d98..307feccac0 100644
--- a/tests/regressiontests/templates/tests.py
+++ b/tests/regressiontests/templates/tests.py
@@ -1031,11 +1031,20 @@ class Templates(unittest.TestCase):
'url08': (u'{% url метка_оператора v %}', {'v': 'Ω'}, '/url_tag/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4/%CE%A9/'),
'url09': (u'{% url метка_оператора_2 tag=v %}', {'v': 'Ω'}, '/url_tag/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4/%CE%A9/'),
'url10': ('{% url regressiontests.templates.views.client_action id=client.id,action="two words" %}', {'client': {'id': 1}}, '/url_tag/client/1/two%20words/'),
+ 'url11': ('{% url regressiontests.templates.views.client_action id=client.id,action="==" %}', {'client': {'id': 1}}, '/url_tag/client/1/==/'),
+ 'url12': ('{% url regressiontests.templates.views.client_action id=client.id,action="," %}', {'client': {'id': 1}}, '/url_tag/client/1/,/'),
+ 'url12': ('{% url regressiontests.templates.views.client_action id=client.id,action=arg|join:"-" %}', {'client': {'id': 1}, 'arg':['a','b']}, '/url_tag/client/1/a-b/'),
# Failures
'url-fail01': ('{% url %}', {}, template.TemplateSyntaxError),
'url-fail02': ('{% url no_such_view %}', {}, urlresolvers.NoReverseMatch),
'url-fail03': ('{% url regressiontests.templates.views.client %}', {}, urlresolvers.NoReverseMatch),
+ 'url-fail04': ('{% url view id, %}', {}, template.TemplateSyntaxError),
+ 'url-fail05': ('{% url view id= %}', {}, template.TemplateSyntaxError),
+ 'url-fail06': ('{% url view a.id=id %}', {}, template.TemplateSyntaxError),
+ 'url-fail07': ('{% url view a.id!id %}', {}, template.TemplateSyntaxError),
+ 'url-fail08': ('{% url view id="unterminatedstring %}', {}, template.TemplateSyntaxError),
+ 'url-fail09': ('{% url view id=", %}', {}, template.TemplateSyntaxError),
# {% url ... as var %}
'url-asvar01': ('{% url regressiontests.templates.views.index as url %}', {}, ''),