Files
mcma-backend/tests
Senko-san 30cb8901f2 fix(tests): isolate suite to a dedicated *_test database
Integration fixtures call Base.metadata.drop_all/create_all on get_engine(),
whose DATABASE_URL points at the developer's real DB — localhost:5432/mcma for
host pytest, db:5432/mcma for `make test-api` (pytest runs inside the api
container). Every run silently wiped dev data: drop_all removes ORM tables but
leaves alembic_version (outside Base.metadata), the exact "tables keep
disappearing, version survives" symptom.

conftest now redirects the whole suite to a <db>_test database before settings
load and creates it on demand via asyncpg, so the dev DB is never opened.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 13:27:58 +03:00
..
2026-06-01 18:47:59 +03:00
2026-06-03 10:40:00 +03:00
2026-06-01 18:47:59 +03:00
2026-06-03 10:40:00 +03:00
2026-06-03 10:40:00 +03:00