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

Function test_verbose

tests/test_main.py:121–142  ·  view source on GitHub ↗
(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, "-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
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