Clear the global sliding-window rate limiter before every test.
()
| 40 | |
| 41 | @pytest.fixture(autouse=True) |
| 42 | def _reset_rate_limiter(): |
| 43 | """Clear the global sliding-window rate limiter before every test.""" |
| 44 | from backend.ratelimit import _limiter |
| 45 | with _limiter._lock: |
| 46 | _limiter._hits.clear() |
| 47 | yield |
| 48 | |
| 49 | |
| 50 | # --------------------------------------------------------------------------- |
nothing calls this directly
no outgoing calls
no test coverage detected