From e631a49baadce21f25dd41a7ef343e90f5f5f31e Mon Sep 17 00:00:00 2001 From: Igor Benav Date: Mon, 23 Dec 2024 05:26:46 -0300 Subject: [PATCH] test fixes --- pyproject.toml | 3 ++- tests/sqlalchemy/core/test_uuid.py | 4 ++-- tests/sqlmodel/core/test_uuid.py | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fedf624..aaa99ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,10 +45,11 @@ mypy = "^1.9.0" ruff = "^0.3.4" coverage = "^7.4.4" testcontainers = "^4.7.1" +asyncpg = "^0.30.0" +psycopg2-binary = "^2.9.10" psycopg = "^3.2.1" aiomysql = "^0.2.0" cryptography = "^43.0.1" -asyncpg = "^0.30.0" [build-system] requires = ["poetry-core"] diff --git a/tests/sqlalchemy/core/test_uuid.py b/tests/sqlalchemy/core/test_uuid.py index 844cad8..01b01b9 100644 --- a/tests/sqlalchemy/core/test_uuid.py +++ b/tests/sqlalchemy/core/test_uuid.py @@ -16,7 +16,7 @@ class UUIDModel(Base): __tablename__ = "uuid_test" id = Column(PostgresUUID(as_uuid=True), primary_key=True, default=uuid4) - name = Column(String) + name = Column(String(255)) class CustomUUID(TypeDecorator): @@ -43,7 +43,7 @@ def process_result_value(self, value, dialect): class CustomUUIDModel(Base): __tablename__ = "custom_uuid_test" id = Column(CustomUUID(), primary_key=True, default=uuid4) - name = Column(String) + name = Column(String(255)) class UUIDSchema(BaseModel): diff --git a/tests/sqlmodel/core/test_uuid.py b/tests/sqlmodel/core/test_uuid.py index 3a3c108..9f3e339 100644 --- a/tests/sqlmodel/core/test_uuid.py +++ b/tests/sqlmodel/core/test_uuid.py @@ -18,7 +18,7 @@ class UUIDModel(SQLModel, table=True): default_factory=uuid4, sa_column=Column(PostgresUUID(as_uuid=True), primary_key=True), ) - name: str + name: str = Field(sa_column=Column(String(255))) class CustomUUID(TypeDecorator): @@ -47,7 +47,7 @@ class CustomUUIDModel(SQLModel, table=True): id: UUID = Field( default_factory=uuid4, sa_column=Column(CustomUUID(), primary_key=True) ) - name: str + name: str = Field(sa_column=Column(String(255))) class UUIDSchema(SQLModel):