From 30bcbc433a4d59ddd0e8c3a268c9d3ce668c74c2 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 3 Sep 2014 16:04:21 +0100 Subject: 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. --- tests/handlers/test_directory.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/handlers') 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") -- cgit 1.4.1