(server)
| 119 | |
| 120 | |
| 121 | def test_verbose(server): |
| 122 | url = str(server.url) |
| 123 | runner = CliRunner() |
| 124 | result = runner.invoke(httpx.main, [url, "-v"]) |
| 125 | assert result.exit_code == 0 |
| 126 | assert remove_date_header(splitlines(result.output)) == [ |
| 127 | "* Connecting to '127.0.0.1'", |
| 128 | "* Connected to '127.0.0.1' on port 8000", |
| 129 | "GET / HTTP/1.1", |
| 130 | f"Host: {server.url.netloc.decode('ascii')}", |
| 131 | "Accept: */*", |
| 132 | "Accept-Encoding: gzip, deflate, br, zstd", |
| 133 | "Connection: keep-alive", |
| 134 | f"User-Agent: python-httpx/{httpx.__version__}", |
| 135 | "", |
| 136 | "HTTP/1.1 200 OK", |
| 137 | "server: uvicorn", |
| 138 | "content-type: text/plain", |
| 139 | "Transfer-Encoding: chunked", |
| 140 | "", |
| 141 | "Hello, world!", |
| 142 | ] |
| 143 | |
| 144 | |
| 145 | def test_auth(server): |
nothing calls this directly
no test coverage detected