Home / Function/ test_http_301_doesnt_change_head_to_get() — requests Function Reference

test_http_301_doesnt_change_head_to_get() — requests Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

tests/test_requests.py lines 276–282

    def test_http_301_doesnt_change_head_to_get(self, httpbin):
        r = requests.head(httpbin("status", "301"), allow_redirects=True)
        print(r.content)
        assert r.status_code == 200
        assert r.request.method == "HEAD"
        assert r.history[0].status_code == 301
        assert r.history[0].is_redirect

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free