summary refs log tree commit diff
path: root/tests/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-20 15:10:36 +0100
committerErik Johnston <erik@matrix.org>2014-08-20 15:10:36 +0100
commitd100ac8c825d08640634850b22d3bd013e0bcfd1 (patch)
tree4fca959ac7ee976f56aebf96dccff77626750ea4 /tests/handlers
parentFix federation test, since we now hit store.get_room (diff)
downloadsynapse-d100ac8c825d08640634850b22d3bd013e0bcfd1.tar.xz
Fix test. get_joined_hosts_for_room get's called multiple times
Diffstat (limited to 'tests/handlers')
-rw-r--r--tests/handlers/test_room.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/handlers/test_room.py b/tests/handlers/test_room.py
index bfdde6135b..be68f17696 100644
--- a/tests/handlers/test_room.py
+++ b/tests/handlers/test_room.py
@@ -140,9 +140,11 @@ class RoomMemberHandlerTestCase(unittest.TestCase):
         joined = ["red", "green"]
 
         self.state_handler.handle_new_event.return_value = defer.succeed(True)
-        self.datastore.get_joined_hosts_for_room.return_value = (
-            defer.succeed(joined)
-        )
+
+        def get_joined(*args):
+            return defer.succeed(joined)
+
+        self.datastore.get_joined_hosts_for_room.side_effect = get_joined
 
         store_id = "store_id_fooo"
         self.datastore.persist_event.return_value = defer.succeed(store_id)