Skip to content

Commit 226f214

Browse files
committed
Fix test database setup
1 parent 15221ea commit 226f214

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

backend/tests/conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@
1111
# Now that the environment is configured, we can import the application
1212
from main import app
1313
from models.base import Base
14+
from models.project import ProjectTable # Import to register with Base
1415
from models.user import UserTable # Import to register with Base
1516
from services.database_service import get_db_service
17+
from services.project_service import ( # Ensure ProjectService is imported
18+
get_project_service,
19+
)
1620
from services.user_service import get_user_service # Ensure UserService is imported
1721

1822

@@ -28,6 +32,7 @@ def test_db_setup():
2832

2933
# Ensure all services are imported to register models
3034
_ = get_user_service()
35+
_ = get_project_service()
3136

3237
# Create tables
3338
Base.metadata.create_all(bind=db_service.engine)

0 commit comments

Comments
 (0)