Skip to content

Commit 4ee42d0

Browse files
committed
test(django): Run user identity ASGI test in a forked process
The new test was the only DB-touching test without @pytest.mark.forked. Running in the parent process leaked the created user into the shared in-memory sqlite DB (UNIQUE constraint failures in test_basic) and caused the parent to hold the session-scoped django_db_setup fixture, so forked children skipped postgres test DB creation but still destroyed it on teardown (database does not exist errors).
1 parent 5a2c705 commit 4ee42d0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tests/integrations/django/asgi/test_asgi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,7 @@ async def test_async_middleware_process_exception_is_awaited(
11021102
assert response["body"] == b"handled by async process_exception"
11031103

11041104

1105+
@pytest.mark.forked
11051106
@pytest.mark.parametrize("application", APPS)
11061107
@pytest.mark.asyncio
11071108
@pytest.mark.skipif(

0 commit comments

Comments
 (0)