summary refs log tree commit diff
path: root/tests/handlers/test_room.py
diff options
context:
space:
mode:
authorDavid Baker <dbkr@users.noreply.github.com>2016-01-08 14:47:15 +0000
committerDavid Baker <dbkr@users.noreply.github.com>2016-01-08 14:47:15 +0000
commitc232780081c7d56de34d7c2a270aabb55bbfeec1 (patch)
treed4cf21a860a1c98e50a2154c076788185c27f9d2 /tests/handlers/test_room.py
parentMerge pull request #475 from matrix-org/markjh/fix_thumbnail (diff)
parentThis comma is actually important (diff)
downloadsynapse-c232780081c7d56de34d7c2a270aabb55bbfeec1.tar.xz
Merge pull request #456 from matrix-org/store_event_actions
Send unread notification counts
Diffstat (limited to 'tests/handlers/test_room.py')
-rw-r--r--tests/handlers/test_room.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/handlers/test_room.py b/tests/handlers/test_room.py
index 12c8bed004..97491848a3 100644
--- a/tests/handlers/test_room.py
+++ b/tests/handlers/test_room.py
@@ -43,6 +43,12 @@ class RoomMemberHandlerTestCase(unittest.TestCase):
                 "store_room",
                 "get_latest_events_in_room",
                 "add_event_hashes",
+                "get_users_in_room",
+                "bulk_get_push_rules",
+                "get_current_state",
+                "set_push_actions_for_event_and_users",
+                "get_state_for_events",
+                "is_guest",
             ]),
             resource_for_federation=NonCallableMock(),
             http_client=NonCallableMock(spec_set=[]),
@@ -90,6 +96,8 @@ class RoomMemberHandlerTestCase(unittest.TestCase):
 
         self.datastore.persist_event.return_value = (1,1)
         self.datastore.add_event_hashes.return_value = []
+        self.datastore.get_users_in_room.return_value = ["@bob:red"]
+        self.datastore.bulk_get_push_rules.return_value = {}
 
     @defer.inlineCallbacks
     def test_invite(self):
@@ -109,6 +117,8 @@ class RoomMemberHandlerTestCase(unittest.TestCase):
         self.datastore.get_latest_events_in_room.return_value = (
             defer.succeed([])
         )
+        self.datastore.get_current_state.return_value = {}
+        self.datastore.get_state_for_events = lambda event_ids,types: {x: {} for x in event_ids}
 
         def annotate(_):
             ctx = Mock()
@@ -190,6 +200,8 @@ class RoomMemberHandlerTestCase(unittest.TestCase):
         self.datastore.get_latest_events_in_room.return_value = (
             defer.succeed([])
         )
+        self.datastore.get_current_state.return_value = {}
+        self.datastore.get_state_for_events = lambda event_ids,types: {x: {} for x in event_ids}
 
         def annotate(_):
             ctx = Mock()
@@ -265,6 +277,8 @@ class RoomMemberHandlerTestCase(unittest.TestCase):
         self.datastore.get_latest_events_in_room.return_value = (
             defer.succeed([])
         )
+        self.datastore.get_current_state.return_value = {}
+        self.datastore.get_state_for_events = lambda event_ids,types: {x: {} for x in event_ids}
 
         def annotate(_):
             ctx = Mock()