From 065dbcd0f894dc6cd9e48996024fd6099930c2e8 Mon Sep 17 00:00:00 2001 From: Giovanni Barillari Date: Mon, 2 Sep 2024 18:41:16 +0200 Subject: [PATCH] Make coverage happy again --- tests/middleware/test_base.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/middleware/test_base.py b/tests/middleware/test_base.py index 361738552..c0440f5cc 100644 --- a/tests/middleware/test_base.py +++ b/tests/middleware/test_base.py @@ -1163,7 +1163,6 @@ async def test_asgi_pathsend_events(tmpdir: Path) -> None: with path.open("w") as file: file.write("") - request_body_sent = False response_complete = anyio.Event() events: list[Message] = [] @@ -1187,12 +1186,7 @@ async def passthrough(request: Request, call_next: RequestResponseEndpoint) -> R } async def receive() -> Message: - nonlocal request_body_sent - if not request_body_sent: - request_body_sent = True - return {"type": "http.request", "body": b"", "more_body": False} - await response_complete.wait() - return {"type": "http.disconnect"} + raise NotImplementedError("Should not be called!") # pragma: no cover async def send(message: Message) -> None: events.append(message)