Home / Function/ test_headers_on_session_with_None_are_not_sent() — requests Function Reference

test_headers_on_session_with_None_are_not_sent() — requests Function Reference

Architecture documentation for the test_headers_on_session_with_None_are_not_sent() function in test_requests.py from the requests codebase.

Entity Profile

Dependency Diagram

graph TD
  729aa7cd_d350_fe53_5ca5_fea48b0156e8["test_headers_on_session_with_None_are_not_sent()"]
  22b80b19_26d4_cd0e_c476_3edf87b3df14["TestRequests"]
  729aa7cd_d350_fe53_5ca5_fea48b0156e8 -->|defined in| 22b80b19_26d4_cd0e_c476_3edf87b3df14
  style 729aa7cd_d350_fe53_5ca5_fea48b0156e8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_requests.py lines 488–494

    def test_headers_on_session_with_None_are_not_sent(self, httpbin):
        """Do not send headers in Session.headers with None values."""
        ses = requests.Session()
        ses.headers["Accept-Encoding"] = None
        req = requests.Request("GET", httpbin("get"))
        prep = ses.prepare_request(req)
        assert "Accept-Encoding" not in prep.headers

Domain

Subdomains

Frequently Asked Questions

What does test_headers_on_session_with_None_are_not_sent() do?
test_headers_on_session_with_None_are_not_sent() is a function in the requests codebase, defined in tests/test_requests.py.
Where is test_headers_on_session_with_None_are_not_sent() defined?
test_headers_on_session_with_None_are_not_sent() is defined in tests/test_requests.py at line 488.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free