summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-03 16:04:21 +0100
committerErik Johnston <erik@matrix.org>2014-09-03 16:04:27 +0100
commit30bcbc433a4d59ddd0e8c3a268c9d3ce668c74c2 (patch)
treeced5e38adc9600ffe25cf2f9c57de40867f11f38 /tests
parentList commands and their usage in the settings page (diff)
downloadsynapse-30bcbc433a4d59ddd0e8c3a268c9d3ce668c74c2.tar.xz
Fix up directory server to not require uploading room hosts. Update the room hosts table with the current room hosts (if we have them) on GET.
Diffstat (limited to 'tests')
-rw-r--r--tests/handlers/test_directory.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/handlers/test_directory.py b/tests/handlers/test_directory.py
index e509c1b629..2361c6d031 100644
--- a/tests/handlers/test_directory.py
+++ b/tests/handlers/test_directory.py
@@ -50,6 +50,7 @@ class DirectoryTestCase(unittest.TestCase):
         hs = HomeServer("test",
             datastore=Mock(spec=[
                 "get_association_from_room_alias",
+                "get_joined_hosts_for_room",
             ]),
             http_client=None,
             resource_for_federation=Mock(),
@@ -61,6 +62,10 @@ class DirectoryTestCase(unittest.TestCase):
 
         self.datastore = hs.get_datastore()
 
+        def hosts(room_id):
+            return defer.succeed([])
+        self.datastore.get_joined_hosts_for_room.side_effect = hosts
+
         self.my_room = hs.parse_roomalias("#my-room:test")
         self.remote_room = hs.parse_roomalias("#another:remote")