"""Test setup: force a deterministic config BEFORE app.py is imported, so tests
never depend on a real .env or a live DB (the DB layer is mocked in the tests)."""
import os

os.environ["MOUNT_PREFIX"] = ""  # routes at /api/* during tests
os.environ["SUBSCRIPTION_URL"] = "https://example.test/pay"
os.environ["REDIRECT_TO_PAY"] = "1"
# Dummy DB creds so importing db never errors; all DB calls are monkeypatched.
os.environ.setdefault("DB_HOST", "localhost")
os.environ.setdefault("DB_USERNAME", "test")
os.environ.setdefault("DB_PASSWORD", "test")
os.environ.setdefault("DB_DATABASE", "test")
