pipeline issues fix
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-09-25 11:59:54 +09:00
parent dc50a9858e
commit 4e3768a6ee
39 changed files with 1297 additions and 739 deletions

View File

@@ -1,18 +1,24 @@
import pytest
import asyncio
import pytest
from httpx import AsyncClient
from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine
from sqlalchemy.orm import sessionmaker
from httpx import AsyncClient
from shared.database import Base
from shared.config import settings
from services.user_service.main import app
from shared.config import settings
from shared.database import Base
# Test database URL
TEST_DATABASE_URL = "postgresql+asyncpg://admin:password@localhost:5432/women_safety_test"
TEST_DATABASE_URL = (
"postgresql+asyncpg://admin:password@localhost:5432/women_safety_test"
)
# Test engine
test_engine = create_async_engine(TEST_DATABASE_URL, echo=True)
TestAsyncSession = sessionmaker(test_engine, class_=AsyncSession, expire_on_commit=False)
TestAsyncSession = sessionmaker(
test_engine, class_=AsyncSession, expire_on_commit=False
)
@pytest.fixture(scope="session")
@@ -56,5 +62,5 @@ def user_data():
"password": "testpassword123",
"first_name": "Test",
"last_name": "User",
"phone": "+1234567890"
}
"phone": "+1234567890",
}