1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

Fix database

This commit is contained in:
MoonTestUse1
2025-01-07 05:26:33 +06:00
parent d9e276ad6b
commit bdf4ae9d70
29 changed files with 727 additions and 531 deletions

View File

@@ -6,7 +6,12 @@ class TestSettings(BaseSettings):
PROJECT_NAME: str = "Employee Request System Test"
# Database
DATABASE_URL: str = "sqlite:///:memory:"
POSTGRES_USER: str = "postgres"
POSTGRES_PASSWORD: str = "postgres"
POSTGRES_HOST: str = "localhost"
POSTGRES_PORT: str = "5432"
POSTGRES_DB: str = "test_app"
DATABASE_URL: str = "postgresql://postgres:postgres@localhost:5432/test_app"
# JWT
SECRET_KEY: str = "test_secret_key"
@@ -16,9 +21,14 @@ class TestSettings(BaseSettings):
# Redis
REDIS_HOST: str = "localhost"
REDIS_PORT: int = 6379
REDIS_DB: int = 1
# Testing
TESTING: bool = True
class Config:
"""Pydantic config"""
case_sensitive = True
env_file = ".env.test"
test_settings = TestSettings()