(server)
| 60 | |
| 61 | |
| 62 | def test_build_post_request(server): |
| 63 | url = server.url.copy_with(path=class="st">"/echo_headers") |
| 64 | headers = {class="st">"Custom-header": class="st">"value"} |
| 65 | |
| 66 | with httpx.Client() as client: |
| 67 | request = client.build_request(class="st">"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()[class="st">"Content-length"] == class="st">"0" |
| 75 | assert response.json()[class="st">"Custom-header"] == class="st">"value" |
| 76 | |
| 77 | |
| 78 | def test_post(server): |
nothing calls this directly
no test coverage detected