(server)
| 38 | |
| 39 | @pytest.mark.anyio |
| 40 | async def test_build_request(server): |
| 41 | url = server.url.copy_with(path=class="st">"/echo_headers") |
| 42 | headers = {class="st">"Custom-header": class="st">"value"} |
| 43 | async with httpx.AsyncClient() as client: |
| 44 | request = client.build_request(class="st">"GET", url) |
| 45 | request.headers.update(headers) |
| 46 | response = await client.send(request) |
| 47 | |
| 48 | assert response.status_code == 200 |
| 49 | assert response.url == url |
| 50 | |
| 51 | assert response.json()[class="st">"Custom-header"] == class="st">"value" |
| 52 | |
| 53 | |
| 54 | @pytest.mark.anyio |
nothing calls this directly
no test coverage detected