(test_client_factory: TestClientFactory)
| 15 | |
| 16 | |
| 17 | def test_request_url(test_client_factory: TestClientFactory) -> None: |
| 18 | async def app(scope: Scope, receive: Receive, send: Send) -> None: |
| 19 | request = Request(scope, receive) |
| 20 | data = {class="st">"method": request.method, class="st">"url": str(request.url)} |
| 21 | response = JSONResponse(data) |
| 22 | await response(scope, receive, send) |
| 23 | |
| 24 | client = test_client_factory(app) |
| 25 | response = client.get(class="st">"/123?a=abc") |
| 26 | assert response.json() == {class="st">"method": class="st">"GET", class="st">"url": class="st">"http://testserver/123?a=abc"} |
| 27 | |
| 28 | response = client.get(class="st">"https://example.org:123/") |
| 29 | assert response.json() == {class="st">"method": class="st">"GET", class="st">"url": class="st">"https://example.org:123/"} |
| 30 | |
| 31 | |
| 32 | def test_request_query_params(test_client_factory: TestClientFactory) -> None: |
nothing calls this directly
no test coverage detected