MCPcopy
hub / github.com/encode/httpx / test_verbose

Function test_verbose

tests/test_main.py:121–142  ·  tests/test_main.py::test_verbose
(server)

Source from the content-addressed store, hash-verified

119
120
121def 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
145def test_auth(server):

Callers

nothing calls this directly

Calls 3

remove_date_headerFunction · 0.85
splitlinesFunction · 0.85
decodeMethod · 0.45

Tested by

no test coverage detected