summary refs log tree commit diff
path: root/tests/handlers/test_directory.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-11-17 16:59:24 +0000
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-11-17 16:59:24 +0000
commit31a049eb692d37387a2db972da754f7ec56218c7 (patch)
tree9e5f47abad904d30c08d2f340b543a631e436894 /tests/handlers/test_directory.py
parentInclude room membership in room initialSync (diff)
parentSYN-148: Add the alias after creating the room (diff)
downloadsynapse-31a049eb692d37387a2db972da754f7ec56218c7.tar.xz
Merge branch 'develop' into room-initial-sync
Conflicts:
	synapse/handlers/message.py
Diffstat (limited to 'tests/handlers/test_directory.py')
-rw-r--r--tests/handlers/test_directory.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/handlers/test_directory.py b/tests/handlers/test_directory.py

index e10a49a8ac..8e164e4be0 100644 --- a/tests/handlers/test_directory.py +++ b/tests/handlers/test_directory.py
@@ -21,9 +21,8 @@ from mock import Mock from synapse.server import HomeServer from synapse.handlers.directory import DirectoryHandler -from synapse.storage.directory import RoomAliasMapping -from tests.utils import SQLiteMemoryDbPool +from tests.utils import SQLiteMemoryDbPool, MockKey class DirectoryHandlers(object): @@ -41,6 +40,7 @@ class DirectoryTestCase(unittest.TestCase): ]) self.query_handlers = {} + def register_query_handler(query_type, handler): self.query_handlers[query_type] = handler self.mock_federation.register_query_handler = register_query_handler @@ -48,11 +48,16 @@ class DirectoryTestCase(unittest.TestCase): db_pool = SQLiteMemoryDbPool() yield db_pool.prepare() - hs = HomeServer("test", + self.mock_config = Mock() + self.mock_config.signing_key = [MockKey()] + + hs = HomeServer( + "test", db_pool=db_pool, http_client=None, resource_for_federation=Mock(), replication_layer=self.mock_federation, + config=self.mock_config, ) hs.handlers = DirectoryHandlers(hs)