test_follow_redirects() — anthropic-sdk-python Function Reference
Architecture documentation for the test_follow_redirects() function in test_client.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 6f122e01_0050_5bd0_e528_1745511abcf3["test_follow_redirects()"] d53b6c34_1743_a045_4be1_3554ab153964["TestAnthropic"] 6f122e01_0050_5bd0_e528_1745511abcf3 -->|defined in| d53b6c34_1743_a045_4be1_3554ab153964 34b60360_05fd_18ba_a466_78c97aafcbd2["test_follow_redirects()"] 34b60360_05fd_18ba_a466_78c97aafcbd2 -->|calls| 6f122e01_0050_5bd0_e528_1745511abcf3 34b60360_05fd_18ba_a466_78c97aafcbd2["test_follow_redirects()"] 6f122e01_0050_5bd0_e528_1745511abcf3 -->|calls| 34b60360_05fd_18ba_a466_78c97aafcbd2 style 6f122e01_0050_5bd0_e528_1745511abcf3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_client.py lines 1068–1077
def test_follow_redirects(self, respx_mock: MockRouter, client: Anthropic) -> None:
# Test that the default follow_redirects=True allows following redirects
respx_mock.post("/redirect").mock(
return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"})
)
respx_mock.get("/redirected").mock(return_value=httpx.Response(200, json={"status": "ok"}))
response = client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response)
assert response.status_code == 200
assert response.json() == {"status": "ok"}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does test_follow_redirects() do?
test_follow_redirects() is a function in the anthropic-sdk-python codebase, defined in tests/test_client.py.
Where is test_follow_redirects() defined?
test_follow_redirects() is defined in tests/test_client.py at line 1068.
What does test_follow_redirects() call?
test_follow_redirects() calls 1 function(s): test_follow_redirects.
What calls test_follow_redirects()?
test_follow_redirects() is called by 1 function(s): test_follow_redirects.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free