gapguide-api / conftest.py
arifRB's picture
Deploy GapGuide backend (Docker)
ffd36e0 verified
Raw
History Blame Contribute Delete
674 Bytes
import os
import pytest
from django.core.cache import cache
# Pin tests to the lexical-only parser layer by default — running the full
# NER chain in CI would trigger ~1 GB of HF model downloads and hang the run.
# Set GAPGUIDE_ML_SMOKE=1 to opt into the real ML chain for the integration
# test at apps/accounts/tests/test_resume_parser_integration.py.
if not os.environ.get("GAPGUIDE_ML_SMOKE"):
os.environ.setdefault("GAPGUIDE_PARSE_LAYERS", "lexical")
@pytest.fixture(autouse=True)
def _clear_throttle_cache():
"""Reset DRF throttle counters between tests so rate limits are
per-test, not per-session."""
cache.clear()
yield
cache.clear()