| 173 | |
| 174 | def test_object_with_getattr(): |
| 175 | class FooGetAttr: |
| 176 | def __getattr__(self, key: str): |
| 177 | if key == 'foo': |
| 178 | return 'Foo' |
| 179 | else: |
| 180 | raise AttributeError |
| 181 | |
| 182 | class Model(BaseModel): |
| 183 | model_config = ConfigDict(from_attributes=True) |
no outgoing calls