venthrive-api / tests /conftest.py
GitHub Actions
Sync from GitHub · 2026-09-24 17:31 UTC
5b5cb48
Raw History Blame Contribute Delete
537 Bytes
# Runs before any test module is imported (pytest loads conftest.py first).
#
# routes/bff.py imports utils/groq_client.py at module level, which raises
# RuntimeError at import time if no GROQ_API_KEY* env var is set (see its own
# docstring). Tests here only exercise pure functions (_stage_guidance,
# BUSINESS_STAGES) that never make a real Groq call, so a fake key is enough
# to get past import — never make a real network call using this value.
import os
os.environ.setdefault("GROQ_API_KEY", "test-key-not-a-real-credential")