15 lines
492 B
Python
15 lines
492 B
Python
"""Pytest bootstrap: isolate the test suite from the development database.
|
|
|
|
Must be imported before any app module (pytest imports conftest.py first), so
|
|
app.models.user picks up the test DB path instead of the dev DB. Without this,
|
|
tests that seed/rotate the admin password (test_auth_and_quota) permanently
|
|
mutate the developer's sonicforge.db.
|
|
"""
|
|
import os
|
|
import tempfile
|
|
|
|
os.environ.setdefault(
|
|
"SONICFORGE_DB_PATH",
|
|
os.path.join(tempfile.gettempdir(), "sonicforge_test.db"),
|
|
)
|