@@ -499,7 +499,7 @@ async def downstream_app(scope, receive, send):
499499
500500
501501def test_read_request_stream_in_app_after_middleware_calls_stream (
502- test_client_factory : Callable [[ASGIApp ], TestClient ]
502+ test_client_factory : Callable [[ASGIApp ], TestClient ],
503503) -> None :
504504 async def homepage (request : Request ):
505505 expected = [b"" ]
@@ -527,7 +527,7 @@ async def dispatch(self, request: Request, call_next: RequestResponseEndpoint):
527527
528528
529529def test_read_request_stream_in_app_after_middleware_calls_body (
530- test_client_factory : Callable [[ASGIApp ], TestClient ]
530+ test_client_factory : Callable [[ASGIApp ], TestClient ],
531531) -> None :
532532 async def homepage (request : Request ):
533533 expected = [b"a" , b"" ]
@@ -552,7 +552,7 @@ async def dispatch(self, request: Request, call_next: RequestResponseEndpoint):
552552
553553
554554def test_read_request_body_in_app_after_middleware_calls_stream (
555- test_client_factory : Callable [[ASGIApp ], TestClient ]
555+ test_client_factory : Callable [[ASGIApp ], TestClient ],
556556) -> None :
557557 async def homepage (request : Request ):
558558 assert await request .body () == b""
@@ -577,7 +577,7 @@ async def dispatch(self, request: Request, call_next: RequestResponseEndpoint):
577577
578578
579579def test_read_request_body_in_app_after_middleware_calls_body (
580- test_client_factory : Callable [[ASGIApp ], TestClient ]
580+ test_client_factory : Callable [[ASGIApp ], TestClient ],
581581) -> None :
582582 async def homepage (request : Request ):
583583 assert await request .body () == b"a"
@@ -599,7 +599,7 @@ async def dispatch(self, request: Request, call_next: RequestResponseEndpoint):
599599
600600
601601def test_read_request_stream_in_dispatch_after_app_calls_stream (
602- test_client_factory : Callable [[ASGIApp ], TestClient ]
602+ test_client_factory : Callable [[ASGIApp ], TestClient ],
603603) -> None :
604604 async def homepage (request : Request ):
605605 expected = [b"a" , b"" ]
@@ -627,7 +627,7 @@ async def dispatch(self, request: Request, call_next: RequestResponseEndpoint):
627627
628628
629629def test_read_request_stream_in_dispatch_after_app_calls_body (
630- test_client_factory : Callable [[ASGIApp ], TestClient ]
630+ test_client_factory : Callable [[ASGIApp ], TestClient ],
631631) -> None :
632632 async def homepage (request : Request ):
633633 assert await request .body () == b"a"
@@ -705,7 +705,7 @@ async def send(msg: Message) -> None:
705705
706706
707707def test_read_request_stream_in_dispatch_after_app_calls_body_with_middleware_calling_body_before_call_next ( # noqa: E501
708- test_client_factory : Callable [[ASGIApp ], TestClient ]
708+ test_client_factory : Callable [[ASGIApp ], TestClient ],
709709) -> None :
710710 async def homepage (request : Request ):
711711 assert await request .body () == b"a"
@@ -733,7 +733,7 @@ async def dispatch(self, request: Request, call_next: RequestResponseEndpoint):
733733
734734
735735def test_read_request_body_in_dispatch_after_app_calls_body_with_middleware_calling_body_before_call_next ( # noqa: E501
736- test_client_factory : Callable [[ASGIApp ], TestClient ]
736+ test_client_factory : Callable [[ASGIApp ], TestClient ],
737737) -> None :
738738 async def homepage (request : Request ):
739739 assert await request .body () == b"a"
@@ -837,7 +837,7 @@ async def send(msg: Message):
837837
838838
839839def test_downstream_middleware_modifies_receive (
840- test_client_factory : Callable [[ASGIApp ], TestClient ]
840+ test_client_factory : Callable [[ASGIApp ], TestClient ],
841841) -> None :
842842 """If a downstream middleware modifies receive() the final ASGI app
843843 should see the modified version.
0 commit comments