summary refs log tree commit diff
path: root/tests/federation
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2022-05-21 16:51:58 +0100
committerErik Johnston <erik@matrix.org>2022-05-21 16:51:58 +0100
commit8141a0d0b35040e0420f1d968054a3e014302d59 (patch)
tree445fe3403fd05c691b912fda58938bcd072a51b9 /tests/federation
parentPull current hosts out from current_state table (diff)
downloadsynapse-8141a0d0b35040e0420f1d968054a3e014302d59.tar.xz
Fix test for prev
Diffstat (limited to 'tests/federation')
-rw-r--r--tests/federation/test_federation_sender.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/federation/test_federation_sender.py b/tests/federation/test_federation_sender.py
index 6b26353d5e..fcc76430df 100644
--- a/tests/federation/test_federation_sender.py
+++ b/tests/federation/test_federation_sender.py
@@ -30,16 +30,16 @@ from tests.unittest import HomeserverTestCase, override_config
 
 class FederationSenderReceiptsTestCases(HomeserverTestCase):
     def make_homeserver(self, reactor, clock):
-        mock_state_handler = Mock(spec=["get_current_hosts_in_room"])
-        # Ensure a new Awaitable is created for each call.
-        mock_state_handler.get_current_hosts_in_room.return_value = make_awaitable(
-            ["test", "host2"]
-        )
-        return self.setup_test_homeserver(
-            state_handler=mock_state_handler,
+        hs = self.setup_test_homeserver(
             federation_transport_client=Mock(spec=["send_transaction"]),
         )
 
+        hs.get_datastores().main.get_current_hosts_in_room = Mock(
+            return_value=make_awaitable(["test", "host2"])
+        )
+
+        return hs
+
     @override_config({"send_federation": True})
     def test_send_receipts(self):
         mock_send_transaction = (