(server)
| 37 | |
| 38 | |
| 39 | def test_json(server): |
| 40 | url = str(server.url.copy_with(path="/json")) |
| 41 | runner = CliRunner() |
| 42 | result = runner.invoke(httpx.main, [url]) |
| 43 | assert result.exit_code == 0 |
| 44 | assert remove_date_header(splitlines(result.output)) == [ |
| 45 | "HTTP/1.1 200 OK", |
| 46 | "server: uvicorn", |
| 47 | "content-type: application/json", |
| 48 | "Transfer-Encoding: chunked", |
| 49 | "", |
| 50 | "{", |
| 51 | '"Hello": "world!"', |
| 52 | "}", |
| 53 | ] |
| 54 | |
| 55 | |
| 56 | def test_binary(server): |
nothing calls this directly
no test coverage detected