MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / test_pydantic_nested_objects

Function test_pydantic_nested_objects

tests/test_transform.py:326–329  ·  view source on GitHub ↗
(use_async: bool)

Source from the content-addressed store, hash-verified

324@parametrize
325@pytest.mark.asyncio
326async def test_pydantic_nested_objects(use_async: bool) -> None:
327 model = ModelNestedObjects.construct(nested={"foo": "stainless"})
328 assert isinstance(model.nested, MyModel)
329 assert cast(Any, await transform(model, Any, use_async)) == {"nested": {"foo": "stainless"}}
330
331
332class ModelWithDefaultField(BaseModel):

Callers

nothing calls this directly

Calls 2

transformFunction · 0.70
constructMethod · 0.45

Tested by

no test coverage detected