DealDocumentScreening/tests/conftest.py
febux 2fe54ffd86 Phase 2 - Raw SQL migration, pytest-cov coverage gate, CI branch
triggers + coverage,  Dead tooling & config drift
2026-08-24 00:45:39 +03:00

19 lines
798 B
Python

"""Shared pytest fixtures.
Unit tests stay fast and dependency-free (no DB/MQ/S3). Integration tests use
the running Docker Compose infrastructure and are marked `@pytest.mark.integration`
(deselected by the default `pytest -q` run).
"""
from __future__ import annotations
import os
# Default test env: prevent Settings() from failing on required fields when no
# .env is present. Individual tests that build Settings override as needed.
os.environ.setdefault("DATABASE_URL", "postgresql+asyncpg://x:x@localhost:5432/x")
os.environ.setdefault("RABBITMQ_URL", "amqp://x:x@localhost:5672//")
os.environ.setdefault("S3_ENDPOINT_URL", "http://localhost:9000")
os.environ.setdefault("S3_ACCESS_KEY", "test")
os.environ.setdefault("S3_SECRET_KEY", "test")
os.environ.setdefault("JWT_SECRET", "test")