mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-12 14:46:37 -05:00
Fix (final) Bugbear violations (#9838)
This commit is contained in:
parent
71f0623de9
commit
495b214f4f
23 changed files with 46 additions and 49 deletions
|
|
@ -646,7 +646,7 @@ class RoomInviteRatelimitTestCase(RoomBase):
|
|||
def test_invites_by_users_ratelimit(self):
|
||||
"""Tests that invites to a specific user are actually rate-limited."""
|
||||
|
||||
for i in range(3):
|
||||
for _ in range(3):
|
||||
room_id = self.helper.create_room_as(self.user_id)
|
||||
self.helper.invite(room_id, self.user_id, "@other-users:red")
|
||||
|
||||
|
|
@ -668,7 +668,7 @@ class RoomJoinRatelimitTestCase(RoomBase):
|
|||
)
|
||||
def test_join_local_ratelimit(self):
|
||||
"""Tests that local joins are actually rate-limited."""
|
||||
for i in range(3):
|
||||
for _ in range(3):
|
||||
self.helper.create_room_as(self.user_id)
|
||||
|
||||
self.helper.create_room_as(self.user_id, expect_code=429)
|
||||
|
|
@ -733,7 +733,7 @@ class RoomJoinRatelimitTestCase(RoomBase):
|
|||
for path in paths_to_test:
|
||||
# Make sure we send more requests than the rate-limiting config would allow
|
||||
# if all of these requests ended up joining the user to a room.
|
||||
for i in range(4):
|
||||
for _ in range(4):
|
||||
channel = self.make_request("POST", path % room_id, {})
|
||||
self.assertEquals(channel.code, 200)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue