test_async_response_parse_mismatched_basemodel() — anthropic-sdk-python Function Reference
Architecture documentation for the test_async_response_parse_mismatched_basemodel() function in test_response.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 59a0fbef_0b86_bf47_cd7a_2098d98ffcf2["test_async_response_parse_mismatched_basemodel()"] d84478fe_6b5f_cefd_a948_48255cf7924b["test_response.py"] 59a0fbef_0b86_bf47_cd7a_2098d98ffcf2 -->|defined in| d84478fe_6b5f_cefd_a948_48255cf7924b style 59a0fbef_0b86_bf47_cd7a_2098d98ffcf2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_response.py lines 77–91
async def test_async_response_parse_mismatched_basemodel(async_client: AsyncAnthropic) -> None:
response = AsyncAPIResponse(
raw=httpx.Response(200, content=b"foo"),
client=async_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`",
):
await response.parse(to=PydanticModel)
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_async_response_parse_mismatched_basemodel() do?
test_async_response_parse_mismatched_basemodel() is a function in the anthropic-sdk-python codebase, defined in tests/test_response.py.
Where is test_async_response_parse_mismatched_basemodel() defined?
test_async_response_parse_mismatched_basemodel() is defined in tests/test_response.py at line 77.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free