Skip to content

Commit 05a869a

Browse files
author
jjjkkkjjj
committed
removed root_urlconf in conftest (#2110)
1 parent 74e5ee2 commit 05a869a

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

tests/conftest.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ def samesite_invalid(settings):
4141
settings.SESSION_COOKIE_SAMESITE = "Hello"
4242

4343

44-
@pytest.fixture
45-
def root_urlconf(settings):
46-
"""Set ROOT_WEBSOCKET_URLCONF."""
47-
settings.ROOT_WEBSOCKET_URLCONF = "__src.routings"
48-
return settings.ROOT_WEBSOCKET_URLCONF
49-
50-
5144
@pytest.fixture(autouse=True)
5245
def mock_modules():
5346
"""Save original modules for each test and clear a cache"""

tests/test_routing.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,14 +302,16 @@ async def test_path_remaining():
302302

303303

304304
@pytest.mark.asyncio
305-
async def test_url_router_nesting_by_include(root_urlconf):
305+
async def test_url_router_nesting_by_include():
306306
"""
307307
Tests that nested URLRouters is constructed by include function.
308308
"""
309309
import sys
310310
from django.urls import include
311311
from django.urls import reverse as django_reverse
312312

313+
root_urlconf = "__src.routings"
314+
313315
test_app = MockApplication(return_value=1)
314316

315317
# mocking the universe module following the directory structure;
@@ -442,14 +444,16 @@ async def test_url_router_nesting_by_include(root_urlconf):
442444

443445

444446
@pytest.mark.asyncio
445-
async def test_url_router_deep_nesting_by_include(root_urlconf):
447+
async def test_url_router_deep_nesting_by_include():
446448
"""
447449
Tests that deep nested URLRouters is constructed by include function.
448450
"""
449451
import sys
450452
from django.urls import include
451453
from django.urls import reverse as django_reverse
452454

455+
root_urlconf = "__src.routings"
456+
453457
test_app = MockApplication(return_value=1)
454458

455459
# mocking the universe module following the directory structure;

0 commit comments

Comments
 (0)