(test_client_factory: TestClientFactory)
| 120 | |
| 121 | |
| 122 | def test_request_form_urlencoded(test_client_factory: TestClientFactory) -> None: |
| 123 | async def app(scope: Scope, receive: Receive, send: Send) -> None: |
| 124 | request = Request(scope, receive) |
| 125 | form = await request.form() |
| 126 | response = JSONResponse({class="st">"form": dict(form)}) |
| 127 | await response(scope, receive, send) |
| 128 | |
| 129 | client = test_client_factory(app) |
| 130 | |
| 131 | response = client.post(class="st">"/", data={class="st">"abc": class="st">"123 @"}) |
| 132 | assert response.json() == {class="st">"form": {class="st">"abc": class="st">"123 @"}} |
| 133 | |
| 134 | |
| 135 | def test_request_form_context_manager(test_client_factory: TestClientFactory) -> None: |
nothing calls this directly
no test coverage detected