Skip to content

Commit 926bd78

Browse files
authored
Split test case with VaidationError into two
1 parent 5de3c0b commit 926bd78

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_pydantic/test_field.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,7 @@ class DateModel(SQLModel):
6767
# Validates correctly
6868

6969
with pytest.raises(ValidationError):
70-
DateModel(date_1="2024-12-31", date_2="2024-12-31")
71-
# This should raise a ValueError due to regex mismatch
70+
DateModel(date_1="incorrect", date_2="12-31-2024") # date_1 pattern mismatch
71+
72+
with pytest.raises(ValidationError):
73+
DateModel(date_1="12-31-2024", date_2="incorrect") # date_2 pattern mismatch

0 commit comments

Comments
 (0)