Home / Function/ test_header_value_not_str() — requests Function Reference

test_header_value_not_str() — requests Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

tests/test_requests.py lines 1775–1781

    def test_header_value_not_str(self, httpbin, invalid_header, key):
        """Ensure the header value is of type string or bytes as
        per discussion in GH issue #3386
        """
        with pytest.raises(InvalidHeader) as excinfo:
            requests.get(httpbin("get"), headers=invalid_header)
        assert key in str(excinfo.value)

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free