Skip to content

Commit

Permalink
馃敟 Remove test for unique_items as it was removed from Pydantic v2
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Oct 26, 2023
1 parent 470e813 commit 8bc6450
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions tests/test_pydantic/test_field.py
@@ -1,5 +1,5 @@
from decimal import Decimal
from typing import List, Optional, Union
from typing import Optional, Union

import pytest
from pydantic import ValidationError
Expand All @@ -22,16 +22,6 @@ class Model(SQLModel):
Model(dec=Decimal("420"))


def test_unique_items():
class Model(SQLModel):
unique_strings: List[str] = Field(unique_items=True)

Model(unique_strings=["x", "y"])

with pytest.raises(ValidationError):
Model(unique_strings=["x", "y", "x"])


def test_discriminator():
# Example adapted from
# [Pydantic docs](https://pydantic-docs.helpmanual.io/usage/types/#discriminated-unions-aka-tagged-unions):
Expand Down

0 comments on commit 8bc6450

Please sign in to comment.