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