test_follow_redirects_disabled() — anthropic-sdk-python Function Reference
Architecture documentation for the test_follow_redirects_disabled() function in test_client.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 4f94bb4d_85d6_4daa_3367_31e017ea8e70["test_follow_redirects_disabled()"] 9bf4cfe0_e3b0_70de_25ac_2113c8918900["TestAsyncAnthropic"] 4f94bb4d_85d6_4daa_3367_31e017ea8e70 -->|defined in| 9bf4cfe0_e3b0_70de_25ac_2113c8918900 dfccdbcd_c5e3_9fd2_966b_c1e56152d6f3["test_follow_redirects_disabled()"] dfccdbcd_c5e3_9fd2_966b_c1e56152d6f3 -->|calls| 4f94bb4d_85d6_4daa_3367_31e017ea8e70 dfccdbcd_c5e3_9fd2_966b_c1e56152d6f3["test_follow_redirects_disabled()"] 4f94bb4d_85d6_4daa_3367_31e017ea8e70 -->|calls| dfccdbcd_c5e3_9fd2_966b_c1e56152d6f3 style 4f94bb4d_85d6_4daa_3367_31e017ea8e70 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_client.py lines 2083–2095
async def test_follow_redirects_disabled(self, respx_mock: MockRouter, async_client: AsyncAnthropic) -> None:
# Test that follow_redirects=False prevents following redirects
respx_mock.post("/redirect").mock(
return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"})
)
with pytest.raises(APIStatusError) as exc_info:
await async_client.post(
"/redirect", body={"key": "value"}, options={"follow_redirects": False}, cast_to=httpx.Response
)
assert exc_info.value.response.status_code == 302
assert exc_info.value.response.headers["Location"] == f"{base_url}/redirected"
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does test_follow_redirects_disabled() do?
test_follow_redirects_disabled() is a function in the anthropic-sdk-python codebase, defined in tests/test_client.py.
Where is test_follow_redirects_disabled() defined?
test_follow_redirects_disabled() is defined in tests/test_client.py at line 2083.
What does test_follow_redirects_disabled() call?
test_follow_redirects_disabled() calls 1 function(s): test_follow_redirects_disabled.
What calls test_follow_redirects_disabled()?
test_follow_redirects_disabled() is called by 1 function(s): test_follow_redirects_disabled.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free