Skip to content

Commit c35e352

Browse files
author
Benjamin Moody
committed
Fix test case to placate mypy.
1 parent 9c7d3fc commit c35e352

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/middleware/test_proxy_headers.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,9 @@ async def wrapper(
5656
receive: ASGIReceiveCallable,
5757
send: ASGISendCallable,
5858
) -> None:
59-
scope = {
60-
**scope,
61-
"client": client,
62-
"server": server,
63-
}
59+
if scope["type"] != "lifespan":
60+
scope["client"] = client
61+
scope["server"] = server
6462
return await app(scope, receive, send)
6563

6664
transport = httpx.ASGITransport(app=wrapper) # type: ignore

0 commit comments

Comments
 (0)