Skip to content

Commit

Permalink
Make coverage happy again
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0baro committed Oct 3, 2024
1 parent 1a27cf5 commit c781d67
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tests/middleware/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,6 @@ async def test_asgi_pathsend_events(tmpdir: Path) -> None:
with path.open("w") as file:
file.write("<file content>")

request_body_sent = False
response_complete = anyio.Event()
events: list[Message] = []

Expand All @@ -1186,12 +1185,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)
Expand Down

0 comments on commit c781d67

Please sign in to comment.