Spaces:
Paused
Paused
File size: 423 Bytes
8b9e569 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # tests/api/conftest.py
import pytest
from main import limiter
@pytest.fixture(autouse=True)
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
|