()
| 199 | |
| 200 | |
| 201 | def test_properties(): |
| 202 | class XyProperty: |
| 203 | x = 4 |
| 204 | |
| 205 | @property |
| 206 | def y(self): |
| 207 | return '5' |
| 208 | |
| 209 | class Model(BaseModel): |
| 210 | model_config = ConfigDict(from_attributes=True) |
| 211 | x: int |
| 212 | y: int |
| 213 | |
| 214 | model = deprecated_from_orm(Model, XyProperty()) |
| 215 | assert model.x == 4 |
| 216 | assert model.y == 5 |
| 217 | |
| 218 | |
| 219 | @pytest.mark.parametrize('extra', ['ignore', 'forbid', 'allow']) |
nothing calls this directly
no test coverage detected