test_stream_with_auth_does_not_set_transfer_encoding_header() — requests Function Reference
Architecture documentation for the test_stream_with_auth_does_not_set_transfer_encoding_header() function in test_requests.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD d81c6f28_d8d0_0216_811d_4e7c46e62cd8["test_stream_with_auth_does_not_set_transfer_encoding_header()"] 22b80b19_26d4_cd0e_c476_3edf87b3df14["TestRequests"] d81c6f28_d8d0_0216_811d_4e7c46e62cd8 -->|defined in| 22b80b19_26d4_cd0e_c476_3edf87b3df14 style d81c6f28_d8d0_0216_811d_4e7c46e62cd8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_requests.py lines 2209–2219
def test_stream_with_auth_does_not_set_transfer_encoding_header(self, httpbin):
"""Ensure that a byte stream with size > 0 will not set both a Content-Length
and Transfer-Encoding header.
"""
auth = ("user", "pass")
url = httpbin("post")
file_obj = io.BytesIO(b"test data")
r = requests.Request("POST", url, auth=auth, data=file_obj)
prepared_request = r.prepare()
assert "Transfer-Encoding" not in prepared_request.headers
assert "Content-Length" in prepared_request.headers
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_stream_with_auth_does_not_set_transfer_encoding_header() do?
test_stream_with_auth_does_not_set_transfer_encoding_header() is a function in the requests codebase, defined in tests/test_requests.py.
Where is test_stream_with_auth_does_not_set_transfer_encoding_header() defined?
test_stream_with_auth_does_not_set_transfer_encoding_header() is defined in tests/test_requests.py at line 2209.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free