"""Redirect the suite at its own database. `app.core.db` builds the engine at import time and several modules bind that object, so the name has to be in the environment before anything imports the settings. Overriding it here — the first module pytest imports for the package — keeps a test run from touching the development data. """ import os os.environ["POSTGRES_DB"] = "app_test" # The MCP session manager can only be entered once per instance, and the suite # builds a TestClient — and so a lifespan — per test module. Tests that want the # endpoint mount it themselves. os.environ["MCP_ENABLED"] = "false"