test_response_parse_mismatched_basemodel() — anthropic-sdk-python Function Reference
Architecture documentation for the test_response_parse_mismatched_basemodel() function in test_legacy_response.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 9c701c33_1307_369e_42c2_beb874fc9700["test_response_parse_mismatched_basemodel()"] 220a5d1f_6983_9c80_71b8_c5877a0fc71e["test_legacy_response.py"] 9c701c33_1307_369e_42c2_beb874fc9700 -->|defined in| 220a5d1f_6983_9c80_71b8_c5877a0fc71e style 9c701c33_1307_369e_42c2_beb874fc9700 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_legacy_response.py lines 18–32
def test_response_parse_mismatched_basemodel(client: Anthropic) -> None:
response = LegacyAPIResponse(
raw=httpx.Response(200, content=b"foo"),
client=client,
stream=False,
stream_cls=None,
cast_to=str,
options=FinalRequestOptions.construct(method="get", url="/foo"),
)
with pytest.raises(
TypeError,
match="Pydantic models must subclass our base model type, e.g. `from anthropic import BaseModel`",
):
response.parse(to=PydanticModel)
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_response_parse_mismatched_basemodel() do?
test_response_parse_mismatched_basemodel() is a function in the anthropic-sdk-python codebase, defined in tests/test_legacy_response.py.
Where is test_response_parse_mismatched_basemodel() defined?
test_response_parse_mismatched_basemodel() is defined in tests/test_legacy_response.py at line 18.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free