diff --git a/tildes/tests/test_ratelimit.py b/tildes/tests/test_ratelimit.py index a606032..51b2b9c 100644 --- a/tildes/tests/test_ratelimit.py +++ b/tildes/tests/test_ratelimit.py @@ -4,6 +4,7 @@ from datetime import timedelta from itertools import permutations from random import randint +from time import sleep from pytest import raises @@ -153,6 +154,7 @@ def test_time_until_retry(redis): # first usage should be fine result = action.check_for_user_id(user_id) assert result.is_allowed + sleep(1.0) # second should fail, and require a wait of (period / limit) - 1 sec result = action.check_for_user_id(user_id)