Spaces:
Runtime error
Runtime error
File size: 674 Bytes
ffd36e0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 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()
|