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

Function test_json

tests/test_main.py:39–53  ·  tests/test_main.py::test_json
(server)

Source from the content-addressed store, hash-verified

37
38
39def test_json(server):
40 url = str(server.url.copy_with(path=class="st">"/json"))
41 runner = CliRunner()
42 result = runner.invoke(httpx.main, [url])
43 assert result.exit_code == 0
44 assert remove_date_header(splitlines(result.output)) == [
45 class="st">"HTTP/1.1 200 OK",
46 class="st">"server: uvicorn",
47 class="st">"content-type: application/json",
48 class="st">"Transfer-Encoding: chunked",
49 class="st">"",
50 class="st">"{",
51 &class="cm">#x27;class="st">"Hello": class="st">"world!"',
52 class="st">"}",
53 ]
54
55
56def test_binary(server):

Callers

nothing calls this directly

Calls 3

remove_date_headerFunction · 0.85
splitlinesFunction · 0.85
copy_withMethod · 0.45

Tested by

no test coverage detected