From 8bc6450c0a445fac8f305e4ef06b6708e2a5e8c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 26 Oct 2023 14:01:51 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Remove=20test=20for=20unique=5Fi?= =?UTF-8?q?tems=20as=20it=20was=20removed=20from=20Pydantic=20v2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_pydantic/test_field.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/tests/test_pydantic/test_field.py b/tests/test_pydantic/test_field.py index 02df42b50d..9d7bc77625 100644 --- a/tests/test_pydantic/test_field.py +++ b/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 @@ -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):