Ticket #3574: URL_test.patch

File URL_test.patch, 1.6 KB (added by yary h <nospam@…>, 8 years ago)

Addition to URL regression test, showing bug/expected behavior

  • tests/regressiontests/templates/views.py

     
    88
    99def client_action(request, id, action):
    1010    pass
     11
     12def with_dot(request, format):
     13    pass
  • tests/regressiontests/templates/tests.py

     
    651651            'url01' : ('{% url regressiontests.templates.views.client client.id %}', {'client': {'id': 1}}, '/url_tag/client/1/'),
    652652            'url02' : ('{% url regressiontests.templates.views.client_action client.id,action="update" %}', {'client': {'id': 1}}, '/url_tag/client/1/update/'),
    653653            'url03' : ('{% url regressiontests.templates.views.index %}', {}, '/url_tag/'),
     654            'url0x' : ('{% url regressiontests.templates.views.with_dot format %}', {'format' : 'ps'}, '/url_tag/with_dot.ps'),
    654655
    655656            # Failures
    656657            'url04' : ('{% url %}', {}, template.TemplateSyntaxError),
  • tests/regressiontests/templates/urls.py

     
    77    (r'^$', views.index),
    88    (r'^client/(\d+)/$', views.client),
    99    (r'^client/(\d+)/(?P<action>[^/]+)/$', views.client_action),
     10    (r'^with_dot\.(html|ps)', views.with_dot),
    1011)
Back to Top