From 05a869abf4d74f0ec9fdd8da58e6e66f7affdaba Mon Sep 17 00:00:00 2001 From: jjjkkkjjj Date: Sat, 10 Aug 2024 11:57:43 +0900 Subject: [PATCH] removed root_urlconf in conftest (#2110) --- tests/conftest.py | 7 ------- tests/test_routing.py | 8 ++++++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 1045194a..3579749e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -41,13 +41,6 @@ def samesite_invalid(settings): settings.SESSION_COOKIE_SAMESITE = "Hello" -@pytest.fixture -def root_urlconf(settings): - """Set ROOT_WEBSOCKET_URLCONF.""" - settings.ROOT_WEBSOCKET_URLCONF = "__src.routings" - return settings.ROOT_WEBSOCKET_URLCONF - - @pytest.fixture(autouse=True) def mock_modules(): """Save original modules for each test and clear a cache""" diff --git a/tests/test_routing.py b/tests/test_routing.py index a5462b88..e79444d3 100644 --- a/tests/test_routing.py +++ b/tests/test_routing.py @@ -302,7 +302,7 @@ async def test_path_remaining(): @pytest.mark.asyncio -async def test_url_router_nesting_by_include(root_urlconf): +async def test_url_router_nesting_by_include(): """ Tests that nested URLRouters is constructed by include function. """ @@ -310,6 +310,8 @@ async def test_url_router_nesting_by_include(root_urlconf): from django.urls import include from django.urls import reverse as django_reverse + root_urlconf = "__src.routings" + test_app = MockApplication(return_value=1) # mocking the universe module following the directory structure; @@ -442,7 +444,7 @@ async def test_url_router_nesting_by_include(root_urlconf): @pytest.mark.asyncio -async def test_url_router_deep_nesting_by_include(root_urlconf): +async def test_url_router_deep_nesting_by_include(): """ Tests that deep nested URLRouters is constructed by include function. """ @@ -450,6 +452,8 @@ async def test_url_router_deep_nesting_by_include(root_urlconf): from django.urls import include from django.urls import reverse as django_reverse + root_urlconf = "__src.routings" + test_app = MockApplication(return_value=1) # mocking the universe module following the directory structure;