summary refs log tree commit diff
path: root/tests/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-01 19:57:17 +0100
committerErik Johnston <erik@matrix.org>2014-09-01 19:57:17 +0100
commit3f5ebccbffda3a5599378b5000a8e78b47e7df7a (patch)
tree2ba8e9155574bef8a1b7a21e193c86f625d88f80 /tests/handlers
parentAdd all the necessary checks to make banning work. (diff)
downloadsynapse-3f5ebccbffda3a5599378b5000a8e78b47e7df7a.tar.xz
Fix the tests to include new db calls
Diffstat (limited to 'tests/handlers')
-rw-r--r--tests/handlers/test_room.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/handlers/test_room.py b/tests/handlers/test_room.py
index 09d2a92e16..219a53c426 100644
--- a/tests/handlers/test_room.py
+++ b/tests/handlers/test_room.py
@@ -330,6 +330,8 @@ class RoomCreationTest(unittest.TestCase):
             datastore=NonCallableMock(spec_set=[
                 "store_room",
                 "snapshot_room",
+                "persist_event",
+                "get_joined_hosts_for_room",
             ]),
             http_client=NonCallableMock(spec_set=[]),
             notifier=NonCallableMock(spec_set=["on_new_room_event"]),
@@ -362,6 +364,10 @@ class RoomCreationTest(unittest.TestCase):
         ])
         self.room_member_handler = self.handlers.room_member_handler
 
+        def hosts(room):
+            return defer.succeed([])
+        self.datastore.get_joined_hosts_for_room.side_effect = hosts
+
     @defer.inlineCallbacks
     def test_room_creation(self):
         user_id = "@foo:red"
@@ -385,9 +391,3 @@ class RoomCreationTest(unittest.TestCase):
         self.assertTrue(self.state_handler.handle_new_event.called)
 
         self.assertTrue(self.federation.handle_new_event.called)
-        config_event = self.federation.handle_new_event.call_args[0][0]
-
-        self.assertEquals(RoomConfigEvent.TYPE, config_event.type)
-        self.assertEquals(room_id, config_event.room_id)
-        self.assertEquals(user_id, config_event.user_id)
-        self.assertEquals(config, config_event.content)