Ticket #12950: test-reverse_namespaced_url.patch

File test-reverse_namespaced_url.patch, 1.3 KB (added by David Bennett, 14 years ago)
  • tests/regressiontests/urlpatterns_reverse/namespace_urls.py

     
    4444
    4545    (r'^included/', include('regressiontests.urlpatterns_reverse.included_namespace_urls')),
    4646
     47    (r'^ns-outer/(?P<outer>\d+)/', include('regressiontests.urlpatterns_reverse.included_namespace_urls', namespace='inc-outer')),
     48
    4749)
  • tests/regressiontests/urlpatterns_reverse/tests.py

     
    306306        self.assertEquals('/ns-included1/normal/', reverse('inc-ns1:inc-normal-view'))
    307307        self.assertEquals('/ns-included1/normal/37/42/', reverse('inc-ns1:inc-normal-view', args=[37,42]))
    308308        self.assertEquals('/ns-included1/normal/42/37/', reverse('inc-ns1:inc-normal-view', kwargs={'arg1':42, 'arg2':37}))
     309        self.assertEquals('/ns-outer/42/normal/', reverse('inc-outer:inc-normal-view', kwargs={'outer':42}))
    309310
    310311    def test_multiple_namespace_pattern(self):
    311312        "Namespaces can be embedded"
Back to Top