Spaces:
Paused
Paused
| # tests/api/conftest.py | |
| import pytest | |
| from main import limiter | |
| def disable_rate_limit(request): | |
| """Disable rate limiting for all tests""" | |
| # Do not disable the rate limiter if the test is marked with enable_rate_limit | |
| if "enable_rate_limit" in request.keywords: | |
| yield | |
| else: | |
| limiter.enabled = False | |
| yield | |
| limiter.enabled = True | |