(
model: type[PydanticUserV2] | type[SQLModelUserV2],
)
| 111 | |
| 112 | @pytest.mark.parametrize("model", [PydanticUserV2, SQLModelUserV2]) |
| 113 | def test_serialize_with_serialization_alias( |
| 114 | model: type[PydanticUserV2] | type[SQLModelUserV2], |
| 115 | ): |
| 116 | user = model(firstName="Jane") |
| 117 | data = user.model_dump(by_alias=True) |
| 118 | assert "f_name" in data |
| 119 | assert "firstName" not in data |
| 120 | assert "first_name" not in data |
| 121 | assert data["f_name"] == "Jane" |
| 122 | |
| 123 | |
| 124 | def test_schema_extra_validation_alias_sqlmodel_v2(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…