Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a couple of extra tests to ensure url tag robustness. These are an

attempt to verify #8726.

Refs #8726.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8766 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 6390155f5c619d708b3dab877388c65ca65d5bcb 1 parent ec525e3
@malcolmt malcolmt authored
View
2  tests/regressiontests/templates/tests.py
@@ -891,6 +891,8 @@ def get_template_tests(self):
'url03': ('{% url regressiontests.templates.views.index %}', {}, '/url_tag/'),
'url04': ('{% url named.client client.id %}', {'client': {'id': 1}}, '/url_tag/named-client/1/'),
'url05': (u'{% url метка_оператора v %}', {'v': u'Ω'}, '/url_tag/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4/%CE%A9/'),
+ 'url06': (u'{% url метка_оператора_2 tag=v %}', {'v': u'Ω'}, '/url_tag/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4/%CE%A9/'),
+ 'url07': (u'{% url regressiontests.templates.views.client2 tag=v %}', {'v': u'Ω'}, '/url_tag/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4/%CE%A9/'),
# Failures
'url-fail01': ('{% url %}', {}, template.TemplateSyntaxError),
View
1  tests/regressiontests/templates/urls.py
@@ -12,4 +12,5 @@
# Unicode strings are permitted everywhere.
url(ur'^Юникод/(\w+)/$', views.client, name=u"метка_оператора"),
+ url(ur'^Юникод/(?P<tag>\S+)/$', 'regressiontests.templates.views.client2', name=u"метка_оператора_2"),
)
View
3  tests/regressiontests/templates/views.py
@@ -8,3 +8,6 @@ def client(request, id):
def client_action(request, id, action):
pass
+
+def client2(request, tag):
+ pass
Please sign in to comment.
Something went wrong with that request. Please try again.