Skip to content

Commit

Permalink
Update remaing include calls
Browse files Browse the repository at this point in the history
Missed as part of encode#5481 cleanup.
  • Loading branch information
carltongibson committed Oct 16, 2017
1 parent cbfa444 commit 7ff344b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/test_routers.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def regex_url_path_detail(self, request, *args, **kwargs):

urlpatterns = [
url(r'^non-namespaced/', include(namespaced_router.urls)),
url(r'^namespaced/', include(namespaced_router.urls, namespace='example', app_name='example')),
url(r'^namespaced/', include((namespaced_router.urls, 'example'), namespace='example')),
url(r'^example/', include(notes_router.urls)),
url(r'^example2/', include(kwarged_notes_router.urls)),

Expand Down
12 changes: 6 additions & 6 deletions tests/test_versioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class TestURLReversing(URLPatternsTestCase):
]

urlpatterns = [
url(r'^v1/', include(included, namespace='v1', app_name='v1')),
url(r'^v1/', include((included, 'v1'), namespace='v1')),
url(r'^another/$', dummy_view, name='another'),
url(r'^(?P<version>[v1|v2]+)/another/$', dummy_view, name='another'),
]
Expand Down Expand Up @@ -335,8 +335,8 @@ class TestHyperlinkedRelatedField(URLPatternsTestCase):
]

urlpatterns = [
url(r'^v1/', include(included, namespace='v1', app_name='v1')),
url(r'^v2/', include(included, namespace='v2', app_name='v2'))
url(r'^v1/', include((included, 'v1'), namespace='v1')),
url(r'^v2/', include((included, 'v2'), namespace='v2'))
]

def setUp(self):
Expand Down Expand Up @@ -367,12 +367,12 @@ class TestNamespaceVersioningHyperlinkedRelatedFieldScheme(URLPatternsTestCase):
]
included = [
url(r'^namespaced/(?P<pk>\d+)/$', dummy_pk_view, name='namespaced'),
url(r'^nested/', include(nested, namespace='nested-namespace', app_name='nested-namespace'))
url(r'^nested/', include((nested, 'nested-namespace'), namespace='nested-namespace'))
]

urlpatterns = [
url(r'^v1/', include(included, namespace='v1', app_name='restframeworkv1')),
url(r'^v2/', include(included, namespace='v2', app_name='restframeworkv2')),
url(r'^v1/', include((included, 'restframeworkv1'), namespace='v1')),
url(r'^v2/', include((included, 'restframeworkv2'), namespace='v2')),
url(r'^non-api/(?P<pk>\d+)/$', dummy_pk_view, name='non-api-view')
]

Expand Down

0 comments on commit 7ff344b

Please sign in to comment.