19 lines
771 B
Python
19 lines
771 B
Python
"""Shared pytest fixtures.
|
|
|
|
Unit tests stay fast and dependency-free (no DB/MQ/S3). Integration tests use
|
|
testcontainers 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")
|