Spaces:
Sleeping
Sleeping
| 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") | |
| def _clear_throttle_cache(): | |
| """Reset DRF throttle counters between tests so rate limits are | |
| per-test, not per-session.""" | |
| cache.clear() | |
| yield | |
| cache.clear() | |