clanker / tests /conftest.py
deucebucket's picture
test: isolate API tests from the real soul.db via conftest SOUL_DB
d888911
Raw
History Blame Contribute Delete
263 Bytes
"""Point the API's global SoulBridge at a throwaway DB so tests never touch
the real ./data/soul.db. Runs before test modules import app.main."""
import os
import tempfile
os.environ["SOUL_DB"] = os.path.join(tempfile.mkdtemp(prefix="clanker-test-"), "soul.db")