refactor: remove duplicate fixtures and add SQLite support
Task 2.5: Remove duplicate fixtures from integration tests - test_auth_api.py, test_auth_services.py, test_models.py - test_projects_api.py, test_seed.py, test_users_api.py - Fix npytest typos in all test files Task 3.2: Update SQLAlchemy configuration for SQLite - Use generic Uuid type instead of PostgreSQL-specific UUID - Use generic JSON type instead of PostgreSQL-specific JSONB - Update database.py to handle SQLite connection args Unit tests now run without PostgreSQL (5/8 passing)
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import DateTime, func
|
||||
from sqlalchemy.dialects.postgresql import UUID
|
||||
from sqlalchemy import DateTime, Uuid, func
|
||||
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
|
||||
|
||||
|
||||
@@ -11,7 +10,7 @@ class Base(DeclarativeBase):
|
||||
|
||||
|
||||
class UUIDPrimaryKeyMixin:
|
||||
id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
id: Mapped[uuid.UUID] = mapped_column(Uuid(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
|
||||
|
||||
class TimestampMixin:
|
||||
|
||||
Reference in New Issue
Block a user