diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-07-30 08:01:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-30 08:01:33 -0400 |
commit | c978f6c4515a631f289aedb1844d8579b9334aaa (patch) | |
tree | 105d4069557d4b78c9b983ebfd8581ffad69165d /tests/federation/test_federation_sender.py | |
parent | Convert appservice to async. (#7973) (diff) | |
download | synapse-c978f6c4515a631f289aedb1844d8579b9334aaa.tar.xz |
Convert federation client to async/await. (#7975)
Diffstat (limited to 'tests/federation/test_federation_sender.py')
-rw-r--r-- | tests/federation/test_federation_sender.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/federation/test_federation_sender.py b/tests/federation/test_federation_sender.py index d1bd18da39..5f512ff8bf 100644 --- a/tests/federation/test_federation_sender.py +++ b/tests/federation/test_federation_sender.py @@ -47,13 +47,13 @@ class FederationSenderReceiptsTestCases(HomeserverTestCase): mock_send_transaction = ( self.hs.get_federation_transport_client().send_transaction ) - mock_send_transaction.return_value = defer.succeed({}) + mock_send_transaction.return_value = make_awaitable({}) sender = self.hs.get_federation_sender() receipt = ReadReceipt( "room_id", "m.read", "user_id", ["event_id"], {"ts": 1234} ) - self.successResultOf(sender.send_read_receipt(receipt)) + self.successResultOf(defer.ensureDeferred(sender.send_read_receipt(receipt))) self.pump() @@ -87,13 +87,13 @@ class FederationSenderReceiptsTestCases(HomeserverTestCase): mock_send_transaction = ( self.hs.get_federation_transport_client().send_transaction ) - mock_send_transaction.return_value = defer.succeed({}) + mock_send_transaction.return_value = make_awaitable({}) sender = self.hs.get_federation_sender() receipt = ReadReceipt( "room_id", "m.read", "user_id", ["event_id"], {"ts": 1234} ) - self.successResultOf(sender.send_read_receipt(receipt)) + self.successResultOf(defer.ensureDeferred(sender.send_read_receipt(receipt))) self.pump() @@ -125,7 +125,7 @@ class FederationSenderReceiptsTestCases(HomeserverTestCase): receipt = ReadReceipt( "room_id", "m.read", "user_id", ["other_id"], {"ts": 1234} ) - self.successResultOf(sender.send_read_receipt(receipt)) + self.successResultOf(defer.ensureDeferred(sender.send_read_receipt(receipt))) self.pump() mock_send_transaction.assert_not_called() |