(use_async: bool)
| 324 | @parametrize |
| 325 | @pytest.mark.asyncio |
| 326 | async 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 | |
| 332 | class ModelWithDefaultField(BaseModel): |