"""Test config.

The engine is lazy (app/db.py), so importing the app needs no database. The
throwaway SQLite URL below is a backstop for any code path that does reach for
a session: the tests here exercise the auth boundary, which rejects a request
before a handler touches the database. Anything needing real tables belongs in a
test that runs against Postgres.
"""

from __future__ import annotations

import os
import sys
from pathlib import Path

sys.path.insert(0, str(Path(__file__).resolve().parent.parent))

os.environ.setdefault("DATABASE_URL", "sqlite+pysqlite:///:memory:")
os.environ.setdefault("APP_SESSION_SECRET", "test-secret-not-a-real-one")
os.environ.setdefault("BW_CLIENT_ID", "dailysplice-test")
os.environ.setdefault("BW_CLIENT_SECRET", "test-secret-not-a-real-one")
os.environ.setdefault("BW_APP_DOMAIN", "https://dailysplice.test")
