test_chunked_upload_does_not_set_content_length_header() — requests Function Reference
Architecture documentation for the test_chunked_upload_does_not_set_content_length_header() function in test_requests.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD 9d2199ae_a4f9_2374_8cd8_99bf69133352["test_chunked_upload_does_not_set_content_length_header()"] 22b80b19_26d4_cd0e_c476_3edf87b3df14["TestRequests"] 9d2199ae_a4f9_2374_8cd8_99bf69133352 -->|defined in| 22b80b19_26d4_cd0e_c476_3edf87b3df14 style 9d2199ae_a4f9_2374_8cd8_99bf69133352 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_requests.py lines 2221–2230
def test_chunked_upload_does_not_set_content_length_header(self, httpbin):
"""Ensure that requests with a generator body stream using
Transfer-Encoding: chunked, not a Content-Length header.
"""
data = (i for i in [b"a", b"b", b"c"])
url = httpbin("post")
r = requests.Request("POST", url, data=data)
prepared_request = r.prepare()
assert "Transfer-Encoding" in prepared_request.headers
assert "Content-Length" not in prepared_request.headers
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_chunked_upload_does_not_set_content_length_header() do?
test_chunked_upload_does_not_set_content_length_header() is a function in the requests codebase, defined in tests/test_requests.py.
Where is test_chunked_upload_does_not_set_content_length_header() defined?
test_chunked_upload_does_not_set_content_length_header() is defined in tests/test_requests.py at line 2221.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free