(server)
| 60 | |
| 61 | |
| 62 | def test_build_post_request(server): |
| 63 | url = server.url.copy_with(path="/echo_headers") |
| 64 | headers = {"Custom-header": "value"} |
| 65 | |
| 66 | with httpx.Client() as client: |
| 67 | request = client.build_request("POST", url) |
| 68 | request.headers.update(headers) |
| 69 | response = client.send(request) |
| 70 | |
| 71 | assert response.status_code == 200 |
| 72 | assert response.url == url |
| 73 | |
| 74 | assert response.json()["Content-length"] == "0" |
| 75 | assert response.json()["Custom-header"] == "value" |
| 76 | |
| 77 | |
| 78 | def test_post(server): |
nothing calls this directly
no test coverage detected