summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-02-18 23:13:29 +0000
committerRichard van der Hoff <richard@matrix.org>2020-02-18 23:21:44 +0000
commitb58d17e44f9d9ff7e70578e0f4e328bb9113ec7e (patch)
tree9c22ec4950ef8785198683afdc951053bfee0c65 /tests
parentImplement GET /_matrix/client/r0/rooms/{roomId}/aliases (#6939) (diff)
downloadsynapse-b58d17e44f9d9ff7e70578e0f4e328bb9113ec7e.tar.xz
Refactor the membership check methods in Auth
these were getting a bit unwieldy, so let's combine `check_joined_room` and
`check_user_was_in_room` into a single `check_user_in_room`.
Diffstat (limited to 'tests')
-rw-r--r--tests/handlers/test_typing.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/handlers/test_typing.py b/tests/handlers/test_typing.py
index 2767b0497a..140cc0a3c2 100644
--- a/tests/handlers/test_typing.py
+++ b/tests/handlers/test_typing.py
@@ -122,11 +122,11 @@ class TypingNotificationsTestCase(unittest.HomeserverTestCase):
 
         self.room_members = []
 
-        def check_joined_room(room_id, user_id):
+        def check_user_in_room(room_id, user_id):
             if user_id not in [u.to_string() for u in self.room_members]:
                 raise AuthError(401, "User is not in the room")
 
-        hs.get_auth().check_joined_room = check_joined_room
+        hs.get_auth().check_user_in_room = check_user_in_room
 
         def get_joined_hosts_for_room(room_id):
             return set(member.domain for member in self.room_members)