From 0875e611255dfc2e8f80a4b7555f5053a4187b87 Mon Sep 17 00:00:00 2001 From: Sergey Klyuykov Date: Mon, 31 Jul 2023 14:22:17 -0700 Subject: [PATCH] Fix router ordering for the same model --- tests/test_routers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_routers.py b/tests/test_routers.py index 8c6d5f60a..80f928ad7 100644 --- a/tests/test_routers.py +++ b/tests/test_routers.py @@ -110,8 +110,8 @@ notes_router.register(r'notes', NoteViewSet) notes_path_router = SimpleRouter(use_regex_path=False) notes_path_router.register('notes', NoteViewSet) -notes_without_patch_path_router = SimpleRouter(use_regex_path=False) -notes_without_patch_path_router.register('notes', NotesWithoutPatchViewSet) +notes_only_put = SimpleRouter(use_regex_path=False) +notes_only_put.register('notes', NotesWithoutPatchViewSet) notes_path_default_router = DefaultRouter(use_regex_path=False) notes_path_default_router.register('notes', NoteViewSet) @@ -505,8 +505,8 @@ class TestUrlPath(URLPatternsTestCase, TestCase): urlpatterns = [ path('path/', include(url_path_router.urls)), path('default/', include(notes_path_default_router.urls)), + path('methods/', include(notes_only_put.urls)), path('example/', include(notes_path_router.urls)), - path('methods/', include(notes_without_patch_path_router.urls)), ] def setUp(self):