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

Function test_generator_with_transfer_encoding_header

tests/models/test_requests.py:33–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31
32
33def test_generator_with_transfer_encoding_header():
34 def content() -> typing.Iterator[bytes]:
35 yield b"test 123" # pragma: no cover
36
37 request = httpx.Request("POST", "http://example.org", content=content())
38 assert request.headers == {"Host": "example.org", "Transfer-Encoding": "chunked"}
39
40
41def test_generator_with_content_length_header():

Callers

nothing calls this directly

Calls 1

contentFunction · 0.70

Tested by

no test coverage detected