summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-03-13 13:17:08 +0000
committerErik Johnston <erik@matrix.org>2018-03-13 13:17:08 +0000
commitbf8e97bd3c11a4bdae9dcf255922b1ac2d03f5b3 (patch)
tree42423f71093a796415971f66ec4a24712bab42c2 /tests
parentAdd docstring (diff)
parentMerge pull request #2980 from matrix-org/erikj/rm_priv (diff)
downloadsynapse-bf8e97bd3c11a4bdae9dcf255922b1ac2d03f5b3.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/factor_remote_leave
Diffstat (limited to 'tests')
-rw-r--r--tests/handlers/test_directory.py9
-rw-r--r--tests/handlers/test_profile.py9
2 files changed, 8 insertions, 10 deletions
diff --git a/tests/handlers/test_directory.py b/tests/handlers/test_directory.py
index 5712773909..b103921498 100644
--- a/tests/handlers/test_directory.py
+++ b/tests/handlers/test_directory.py
@@ -35,21 +35,20 @@ class DirectoryTestCase(unittest.TestCase):
 
     @defer.inlineCallbacks
     def setUp(self):
-        self.mock_federation = Mock(spec=[
-            "make_query",
-            "register_edu_handler",
-        ])
+        self.mock_federation = Mock()
+        self.mock_registry = Mock()
 
         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
+        self.mock_registry.register_query_handler = register_query_handler
 
         hs = yield setup_test_homeserver(
             http_client=None,
             resource_for_federation=Mock(),
             replication_layer=self.mock_federation,
+            federation_registry=self.mock_registry,
         )
         hs.handlers = DirectoryHandlers(hs)
 
diff --git a/tests/handlers/test_profile.py b/tests/handlers/test_profile.py
index a5f47181d7..73223ffbd3 100644
--- a/tests/handlers/test_profile.py
+++ b/tests/handlers/test_profile.py
@@ -37,23 +37,22 @@ class ProfileTestCase(unittest.TestCase):
 
     @defer.inlineCallbacks
     def setUp(self):
-        self.mock_federation = Mock(spec=[
-            "make_query",
-            "register_edu_handler",
-        ])
+        self.mock_federation = Mock()
+        self.mock_registry = Mock()
 
         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
+        self.mock_registry.register_query_handler = register_query_handler
 
         hs = yield setup_test_homeserver(
             http_client=None,
             handlers=None,
             resource_for_federation=Mock(),
             replication_layer=self.mock_federation,
+            federation_registry=self.mock_registry,
             ratelimiter=NonCallableMock(spec_set=[
                 "send_message",
             ])