fixed router tests

This commit is contained in:
Rick van Hattem 2020-03-05 13:16:42 +01:00
parent 74fce83385
commit 5451b02ec6
No known key found for this signature in database
GPG Key ID: E81444E9CE1F695D

View File

@ -271,7 +271,7 @@ class TestTrailingSlashIncluded(TestCase):
self.urls = self.router.urls
def test_urls_have_trailing_slash_by_default(self):
expected = ['^notes/$', '^notes/(?P<pk>[^/.]+)/$']
expected = ['^notes/$', '^notes/(?P<pk>[^/]+)/$']
for idx in range(len(expected)):
assert expected[idx] == get_regex_pattern(self.urls[idx])
@ -286,7 +286,7 @@ class TestTrailingSlashRemoved(TestCase):
self.urls = self.router.urls
def test_urls_can_have_trailing_slash_removed(self):
expected = ['^notes$', '^notes/(?P<pk>[^/.]+)$']
expected = ['^notes$', '^notes/(?P<pk>[^/]+)$']
for idx in range(len(expected)):
assert expected[idx] == get_regex_pattern(self.urls[idx])