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

Function test_binary

tests/test_main.py:56–69  ·  tests/test_main.py::test_binary
(server)

Source from the content-addressed store, hash-verified

54
55
56def test_binary(server):
57 url = str(server.url.copy_with(path=class="st">"/echo_binary"))
58 runner = CliRunner()
59 content = class="st">"Hello, world!"
60 result = runner.invoke(httpx.main, [url, class="st">"-c", content])
61 assert result.exit_code == 0
62 assert remove_date_header(splitlines(result.output)) == [
63 class="st">"HTTP/1.1 200 OK",
64 class="st">"server: uvicorn",
65 class="st">"content-type: application/octet-stream",
66 class="st">"Transfer-Encoding: chunked",
67 class="st">"",
68 fclass="st">"<{len(content)} bytes of binary data>",
69 ]
70
71
72def test_redirects(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