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

Function test_get

tests/test_main.py:24–36  ·  view source on GitHub ↗
(server)

Source from the content-addressed store, hash-verified

22
23
24def test_get(server):
25 url = str(server.url)
26 runner = CliRunner()
27 result = runner.invoke(httpx.main, [url])
28 assert result.exit_code == 0
29 assert remove_date_header(splitlines(result.output)) == [
30 "HTTP/1.1 200 OK",
31 "server: uvicorn",
32 "content-type: text/plain",
33 "Transfer-Encoding: chunked",
34 "",
35 "Hello, world!",
36 ]
37
38
39def test_json(server):

Callers

nothing calls this directly

Calls 2

remove_date_headerFunction · 0.85
splitlinesFunction · 0.85

Tested by

no test coverage detected