test(throttling): Explicitly enable throttling to make test more stable

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2670>
pipelines/34733
Georg Krause 2023-12-06 09:29:21 +00:00
rodzic 06d135875b
commit 33cd0f05a7
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -269,6 +269,7 @@ def test_throttle_calls_attach_info(method, mocker):
def test_allow_request(api_request, settings, mocker):
settings.THROTTLING_ENABLED = True
settings.THROTTLING_RATES = {"test": {"rate": "2/s"}}
ip = "92.92.92.92"
request = api_request.get("/", HTTP_X_FORWARDED_FOR=ip)