Skip to content

Commit 8bc6450

Browse files
committed
🔥 Remove test for unique_items as it was removed from Pydantic v2
1 parent 470e813 commit 8bc6450

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

tests/test_pydantic/test_field.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from decimal import Decimal
2-
from typing import List, Optional, Union
2+
from typing import Optional, Union
33

44
import pytest
55
from pydantic import ValidationError
@@ -22,16 +22,6 @@ class Model(SQLModel):
2222
Model(dec=Decimal("420"))
2323

2424

25-
def test_unique_items():
26-
class Model(SQLModel):
27-
unique_strings: List[str] = Field(unique_items=True)
28-
29-
Model(unique_strings=["x", "y"])
30-
31-
with pytest.raises(ValidationError):
32-
Model(unique_strings=["x", "y", "x"])
33-
34-
3525
def test_discriminator():
3626
# Example adapted from
3727
# [Pydantic docs](https://pydantic-docs.helpmanual.io/usage/types/#discriminated-unions-aka-tagged-unions):

0 commit comments

Comments
 (0)