Commits

bmih...@Macintosh-2.local  committed d0b4a39

Added failing test when lang code exists in URL.

  • Participants
  • Parent commits f54419b
  • Branches feature-28-reverse-check-lang-missing

Comments (0)

Files changed (2)

File localeurl/tests/test_urls.py

 urlpatterns = patterns('localeurl.tests.test_urls',
      url(r'^dummy/$', 'dummy', name='dummy0'),
      url(r'^dummy/(?P<test>.+)$', 'dummy', name='dummy1'),
+     url(r'^(.*)/$', 'dummy', name='catch_all'),
 )
 
 def dummy(request, test='test'):

File localeurl/tests/tests.py

     def test_kwargs_none(self):
         url = reverse("dummy1", args=["test"], kwargs=None)
         self.assertEqual(url, "/en/dummy/test")
+
+
+    def test_lang_already_prepended(self):
+        url = reverse("catch_all", args=('/en/some-path/', ))
+        self.assertEqual(url, "/en/some-path/")