Skip to content

Commit

Permalink
removed root_urlconf in conftest (#2110)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjkkkjjj committed Aug 10, 2024
1 parent 74e5ee2 commit 05a869a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 0 additions & 7 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down
8 changes: 6 additions & 2 deletions tests/test_routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,16 @@ 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.
"""
import sys
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;
Expand Down Expand Up @@ -442,14 +444,16 @@ 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.
"""
import sys
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;
Expand Down

0 comments on commit 05a869a

Please sign in to comment.