mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-28 00:49:49 +03:00
fixed router tests
This commit is contained in:
parent
74fce83385
commit
5451b02ec6
|
@ -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])
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user