diff --git a/tests/test_frontend.py b/tests/test_frontend.py index f587faafbc..0a44df72ed 100644 --- a/tests/test_frontend.py +++ b/tests/test_frontend.py @@ -578,11 +578,8 @@ async def test_frontend_dependency_restores_existing_dependency_stacks( messages = [] async def receive(): - return { # pragma: no cover - "type": "http.request", - "body": b"", - "more_body": False, - } + # Keep the connection open until the response finishes. + await anyio.sleep_forever() async def send(message): messages.append(message)