Initial commit: backend scaffold, auth, frontend login
- FastAPI + SQLAlchemy async + Alembic + Postgres backend - Auth: JWT access + rotating refresh tokens, argon2, roles, audit log - React 19 + Vite frontend: login page, protected route, auth context - Docker Compose: postgres, redis, migrate, api, worker (placeholder), frontend/nginx Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
"""Общая настройка тестов.
|
||||
|
||||
Переменные окружения проставляются до импорта `app.core.config`, иначе
|
||||
Settings прочитает рабочий .env (или упадёт на его отсутствии).
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
|
||||
from cryptography.fernet import Fernet
|
||||
|
||||
os.environ.setdefault("ENVIRONMENT", "local")
|
||||
os.environ.setdefault("SECRET_KEY", "test-secret-key-not-for-production")
|
||||
os.environ.setdefault("ENCRYPTION_KEY", Fernet.generate_key().decode())
|
||||
os.environ.setdefault("POSTGRES_HOST", "localhost")
|
||||
os.environ.setdefault("POSTGRES_PASSWORD", "test")
|
||||
os.environ.setdefault("CORS_ORIGINS", "")
|
||||
Reference in New Issue
Block a user