summary refs log tree commit diff
path: root/tests/handlers/test_typing.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2015-04-15 23:32:11 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2015-04-15 23:32:11 +0100
commit04c7f3576ec586ec16aa232794d01035390f8611 (patch)
treee12f85132f8b18b6fa08780d389a94f0a35f2d5a /tests/handlers/test_typing.py
parentHave TypingNotificationEventSource.get_new_events_for_user() return a deferre... (diff)
downloadsynapse-04c7f3576ec586ec16aa232794d01035390f8611.tar.xz
Various minor fixes to unit-test structure around typing notifications
Diffstat (limited to 'tests/handlers/test_typing.py')
-rw-r--r--tests/handlers/test_typing.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/handlers/test_typing.py b/tests/handlers/test_typing.py
index 39590115e0..91d4102fee 100644
--- a/tests/handlers/test_typing.py
+++ b/tests/handlers/test_typing.py
@@ -126,6 +126,13 @@ class TypingNotificationsTestCase(unittest.TestCase):
                 return defer.succeed([])
         self.room_member_handler.get_room_members = get_room_members
 
+        def get_joined_rooms_for_user(user):
+            if user in self.room_members:
+                return defer.succeed([self.room_id])
+            else:
+                return defer.succeed([])
+        self.room_member_handler.get_joined_rooms_for_user = get_joined_rooms_for_user
+
         @defer.inlineCallbacks
         def fetch_room_distributions_into(room_id, localusers=None,
                 remotedomains=None, ignore_user=None):