summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2017-12-04 17:10:03 +0000
committerMatthew Hodgson <matthew@matrix.org>2017-12-04 17:10:03 +0000
commit7b86c1fdcdb71cde499e634e97685dfc47d3e0d0 (patch)
treee23cb6607d7d9cdfaf4952df3b9e51ce4e09aa7c /tests
parenterik told me to (diff)
downloadsynapse-7b86c1fdcdb71cde499e634e97685dfc47d3e0d0.tar.xz
try make tests work a bit more...
Diffstat (limited to 'tests')
-rw-r--r--tests/handlers/test_typing.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/handlers/test_typing.py b/tests/handlers/test_typing.py
index 8c6815bcd8..fcd380b03a 100644
--- a/tests/handlers/test_typing.py
+++ b/tests/handlers/test_typing.py
@@ -76,6 +76,9 @@ class TypingNotificationsTestCase(unittest.TestCase):
                 "set_received_txn_response",
                 "get_destination_retry_timings",
                 "get_devices_by_remote",
+                # Bits that user_directory needs
+                "get_user_directory_stream_pos",
+                "get_current_state_deltas",
             ]),
             state_handler=self.state_handler,
             handlers=None,
@@ -122,6 +125,15 @@ class TypingNotificationsTestCase(unittest.TestCase):
             return set(str(u) for u in self.room_members)
         self.state_handler.get_current_user_in_room = get_current_user_in_room
 
+        self.datastore.get_user_directory_stream_pos.return_value = (
+            # we deliberately return a non-None stream pos to avoid doing an initial_spam
+            defer.succeed(1)
+        )
+
+        self.datastore.get_current_state_deltas.return_value = (
+            None
+        )
+
         self.auth.check_joined_room = check_joined_room
 
         self.datastore.get_to_device_stream_token = lambda: 0