(server)
| 104 | |
| 105 | |
| 106 | def test_post(server): |
| 107 | url = str(server.url.copy_with(path="/echo_body")) |
| 108 | runner = CliRunner() |
| 109 | result = runner.invoke(httpx.main, [url, "-m", "POST", "-j", '{"hello": "world"}']) |
| 110 | assert result.exit_code == 0 |
| 111 | assert remove_date_header(splitlines(result.output)) == [ |
| 112 | "HTTP/1.1 200 OK", |
| 113 | "server: uvicorn", |
| 114 | "content-type: text/plain", |
| 115 | "Transfer-Encoding: chunked", |
| 116 | "", |
| 117 | '{"hello":"world"}', |
| 118 | ] |
| 119 | |
| 120 | |
| 121 | def test_verbose(server): |
nothing calls this directly
no test coverage detected