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

Function test_multipart_header_without_boundary

tests/test_multipart.py:86–94  ·  view source on GitHub ↗
(header: str)

Source from the content-addressed store, hash-verified

84 ],
85)
86def test_multipart_header_without_boundary(header: str) -> None:
87 client = httpx.Client(transport=httpx.MockTransport(echo_request_content))
88
89 files = {"file": io.BytesIO(b"<file content>")}
90 headers = {"content-type": header}
91 response = client.post("http://127.0.0.1:8000/", files=files, headers=headers)
92
93 assert response.status_code == 200
94 assert response.request.headers["Content-Type"] == header
95
96
97@pytest.mark.parametrize(("key"), (b"abc", 1, 2.3, None))

Callers

nothing calls this directly

Calls 1

postMethod · 0.95

Tested by

no test coverage detected