farient-deckcheck / conftest.py
Xander Labide
Claude Opus 4.7 (1M context)
Initial commit — Farient DeckCheck
fdfe81a
Raw History Blame Contribute Delete
958 Bytes
"""Pytest config for apps/api.
Loads apps/api/.env before tests start so RUN_LIVE=1 smoke tests pick up the
project-local OPENAI_API_KEY without requiring it to be exported in the shell.
Real shell env still wins (override=False).
Also pins ``SLIDE_REVIEWER_MODE=agentic`` for the test process. Production
defaults to ``single_shot`` (multimodal pre-computed bundle, one turn) but
the existing runner mocks marshal a JSON briefing into the agent's input
and inspect ``agent.name == "Slide Reviewer"`` — both still work in agentic
mode unchanged. Tests that exercise the single-shot path opt in explicitly
via monkeypatch.
"""
import os
from pathlib import Path
from dotenv import load_dotenv
load_dotenv(Path(__file__).parent / ".env", override=True)
# Pin tests to the legacy briefing-only flow unless a test explicitly
# overrides via monkeypatch.setenv("SLIDE_REVIEWER_MODE", "single_shot").
os.environ.setdefault("SLIDE_REVIEWER_MODE", "agentic")