mirror of https://github.com/zulip/zulip.git
test_external: Assert that requests don't get rate limited too soon.
This assertion was missing in do_test_hit_ratelimits, allowing a test to pass even if the requests started being blocked sooner than expected.
This commit is contained in:
parent
0d6bb6d53b
commit
29b3e81dd4
|
@ -155,6 +155,8 @@ class RateLimitTests(ZulipTestCase):
|
|||
for i in range(6):
|
||||
with mock.patch("time.time", return_value=(start_time + i * 0.1)):
|
||||
result = request_func()
|
||||
if i < 5:
|
||||
self.assertNotEqual(result.status_code, 429)
|
||||
|
||||
assert_func(result)
|
||||
|
||||
|
|
Loading…
Reference in New Issue