Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Skip alias tests in Pydantic v1
  • Loading branch information
ravishan16 committed Sep 25, 2025
commit 72e8c36b914c2aefbb8208a7d3933328663e7506
2 changes: 2 additions & 0 deletions tests/test_aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,14 @@ class SQLModelUserV2(SQLModel):
)


@pytest.mark.skipif(not VERSION.startswith("2."), reason="validation_alias and serialization_alias are not supported in Pydantic v1")
@pytest.mark.parametrize("model", [PydanticUserV2, SQLModelUserV2])
def test_create_with_validation_alias(model: Union[Type[PydanticUserV2], Type[SQLModelUserV2]]):
user = model(firstName="John")
assert user.first_name == "John"


@pytest.mark.skipif(not VERSION.startswith("2."), reason="validation_alias and serialization_alias are not supported in Pydantic v1")
@pytest.mark.parametrize("model", [PydanticUserV2, SQLModelUserV2])
def test_serialize_with_serialization_alias(
model: Union[Type[PydanticUserV2], Type[SQLModelUserV2]]
Expand Down
Loading