"""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"