Ticket #13260: t13260-test2.diff

File t13260-test2.diff, 1.6 KB (added by stumbles, 14 years ago)

Additional tests to also cover % in keyword arguments

  • tests/regressiontests/urlpatterns_reverse/tests.py

     
    6868    ('headlines', '/headlines/2007.5.21/', [], dict(year=2007, month=5, day=21)),
    6969    ('windows', r'/windows_path/C:%5CDocuments%20and%20Settings%5Cspam/', [], dict(drive_name='C', path=r'Documents and Settings\spam')),
    7070    ('special', r'/special_chars/+%5C$*/', [r'+\$*'], {}),
     71    ('special', r'/special_chars/some%20resource/', [], {'chars': r'some resource'}),
     72    ('special', r'/special_chars/10%25%20complete/', [], {'chars': r'10% complete'}),
    7173    ('special', NoReverseMatch, [''], {}),
    7274    ('mixed', '/john/0/', [], {'name': 'john'}),
    7375    ('repeats', '/repeats/a/', [], {}),
  • tests/regressiontests/urlpatterns_reverse/urls.py

     
    3535            name="headlines"),
    3636    url(r'^windows_path/(?P<drive_name>[A-Z]):\\(?P<path>.+)/$', empty_view,
    3737            name="windows"),
    38     url(r'^special_chars/(.+)/$', empty_view, name="special"),
     38    url(r'^special_chars/(?P<chars>.+)/$', empty_view, name="special"),
    3939    url(r'^(?P<name>.+)/\d+/$', empty_view, name="mixed"),
    4040    url(r'^repeats/a{1,2}/$', empty_view, name="repeats"),
    4141    url(r'^repeats/a{2,4}/$', empty_view, name="repeats2"),
Back to Top