From c02b579f1b14f98fa0aaca0a62c6ab0c5ecfd543 Mon Sep 17 00:00:00 2001 From: honglei Date: Fri, 25 Aug 2023 22:08:03 +0800 Subject: [PATCH] support AnyURL --- tests/test_nullable.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_nullable.py b/tests/test_nullable.py index 22e1e1b..6d3df54 100644 --- a/tests/test_nullable.py +++ b/tests/test_nullable.py @@ -57,6 +57,7 @@ def test_nullable_fields(clear_sqlmodel, caplog): str_default_str_nullable: str = Field(default="default", nullable=True) str_default_ellipsis_non_nullable: str = Field(default=..., nullable=False) str_default_ellipsis_nullable: str = Field(default=..., nullable=True) + base_url : AnyUrl optional_url: Optional[MoveSharedUrl] = Field(default=None, description="") url: MoveSharedUrl annotated_url: Annotated[MoveSharedUrl, Field(description="")] @@ -93,6 +94,7 @@ def test_nullable_fields(clear_sqlmodel, caplog): assert "str_default_str_nullable VARCHAR," in create_table_log assert "str_default_ellipsis_non_nullable VARCHAR NOT NULL," in create_table_log assert "str_default_ellipsis_nullable VARCHAR," in create_table_log + assert "base_url VARCHAR NOT NULL," in create_table_log assert "optional_url VARCHAR(512), " in create_table_log assert "url VARCHAR(512) NOT NULL," in create_table_log assert "annotated_url VARCHAR(512) NOT NULL," in create_table_log