test_async_response_basemodel_request_id() — anthropic-sdk-python Function Reference
Architecture documentation for the test_async_response_basemodel_request_id() function in test_response.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 34a9b859_3ad7_9491_c4a9_08cd3db5268c["test_async_response_basemodel_request_id()"] d84478fe_6b5f_cefd_a948_48255cf7924b["test_response.py"] 34a9b859_3ad7_9491_c4a9_08cd3db5268c -->|defined in| d84478fe_6b5f_cefd_a948_48255cf7924b style 34a9b859_3ad7_9491_c4a9_08cd3db5268c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_response.py lines 180–197
async def test_async_response_basemodel_request_id(client: Anthropic) -> None:
response = AsyncAPIResponse(
raw=httpx.Response(
200,
headers={"request-id": "my-req-id"},
content=json.dumps({"foo": "hello!", "bar": 2}),
),
client=client,
stream=False,
stream_cls=None,
cast_to=str,
options=FinalRequestOptions.construct(method="get", url="/foo"),
)
obj = await response.parse(to=CustomModel)
assert obj._request_id == "my-req-id"
assert obj.foo == "hello!"
assert obj.bar == 2
assert obj.to_dict() == {"foo": "hello!", "bar": 2}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_async_response_basemodel_request_id() do?
test_async_response_basemodel_request_id() is a function in the anthropic-sdk-python codebase, defined in tests/test_response.py.
Where is test_async_response_basemodel_request_id() defined?
test_async_response_basemodel_request_id() is defined in tests/test_response.py at line 180.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free