(test_client_factory: TestClientFactory)
| 133 | |
| 134 | |
| 135 | def test_request_form_context_manager(test_client_factory: TestClientFactory) -> None: |
| 136 | async def app(scope: Scope, receive: Receive, send: Send) -> None: |
| 137 | request = Request(scope, receive) |
| 138 | async with request.form() as form: |
| 139 | response = JSONResponse({class="st">"form": dict(form)}) |
| 140 | await response(scope, receive, send) |
| 141 | |
| 142 | client = test_client_factory(app) |
| 143 | |
| 144 | response = client.post(class="st">"/", data={class="st">"abc": class="st">"123 @"}) |
| 145 | assert response.json() == {class="st">"form": {class="st">"abc": class="st">"123 @"}} |
| 146 | |
| 147 | |
| 148 | def test_request_body_then_stream(test_client_factory: TestClientFactory) -> None: |
nothing calls this directly
no test coverage detected