(test_client_factory: TestClientFactory)
| 326 | |
| 327 | |
| 328 | def test_request_state(test_client_factory: TestClientFactory) -> None: |
| 329 | async def app(scope: Scope, receive: Receive, send: Send) -> None: |
| 330 | request = Request(scope, receive) |
| 331 | request.state.example = 123 |
| 332 | response = JSONResponse({class="st">"state.example": request.state.example}) |
| 333 | await response(scope, receive, send) |
| 334 | |
| 335 | client = test_client_factory(app) |
| 336 | response = client.get(class="st">"/123?a=abc") |
| 337 | assert response.json() == {class="st">"state.example": 123} |
| 338 | |
| 339 | |
| 340 | def test_request_cookies(test_client_factory: TestClientFactory) -> None: |
nothing calls this directly
no test coverage detected