Skip to content

Commit c781d67

Browse files
committed
Make coverage happy again
1 parent 1a27cf5 commit c781d67

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

tests/middleware/test_base.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,6 @@ async def test_asgi_pathsend_events(tmpdir: Path) -> None:
11621162
with path.open("w") as file:
11631163
file.write("<file content>")
11641164

1165-
request_body_sent = False
11661165
response_complete = anyio.Event()
11671166
events: list[Message] = []
11681167

@@ -1186,12 +1185,7 @@ async def passthrough(request: Request, call_next: RequestResponseEndpoint) -> R
11861185
}
11871186

11881187
async def receive() -> Message:
1189-
nonlocal request_body_sent
1190-
if not request_body_sent:
1191-
request_body_sent = True
1192-
return {"type": "http.request", "body": b"", "more_body": False}
1193-
await response_complete.wait()
1194-
return {"type": "http.disconnect"}
1188+
raise NotImplementedError("Should not be called!") # pragma: no cover
11951189

11961190
async def send(message: Message) -> None:
11971191
events.append(message)

0 commit comments

Comments
 (0)