()
| 258 | |
| 259 | |
| 260 | def test_nested_orm(): |
| 261 | class User(BaseModel): |
| 262 | model_config = ConfigDict(from_attributes=True) |
| 263 | first_name: str |
| 264 | last_name: str |
| 265 | |
| 266 | class State(BaseModel): |
| 267 | model_config = ConfigDict(from_attributes=True) |
| 268 | user: User |
| 269 | |
| 270 | # Pass an "orm instance" |
| 271 | deprecated_from_orm(State, SimpleNamespace(user=SimpleNamespace(first_name='John', last_name='Appleseed'))) |
| 272 | |
| 273 | # Pass dictionary data directly |
| 274 | State(**{'user': {'first_name': 'John', 'last_name': 'Appleseed'}}) |
| 275 | |
| 276 | |
| 277 | def test_parse_raw_pass(): |
nothing calls this directly
no test coverage detected