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

Function test_get

tests/test_main.py:24–36  ·  tests/test_main.py::test_get
(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 class="st">"HTTP/1.1 200 OK",
31 class="st">"server: uvicorn",
32 class="st">"content-type: text/plain",
33 class="st">"Transfer-Encoding: chunked",
34 class="st">"",
35 class="st">"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