diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-03-12 11:37:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-12 11:37:57 -0500 |
commit | 55da8df0782f80c43d127cd563cfbb89106319db (patch) | |
tree | 655b690a5e7bf6d564bd47d3bd0c8924d7360851 /tests/replication/test_federation_ack.py | |
parent | Reject concurrent transactions (#9597) (diff) | |
download | synapse-55da8df0782f80c43d127cd563cfbb89106319db.tar.xz |
Fix additional type hints from Twisted 21.2.0. (#9591)
Diffstat (limited to 'tests/replication/test_federation_ack.py')
-rw-r--r-- | tests/replication/test_federation_ack.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/replication/test_federation_ack.py b/tests/replication/test_federation_ack.py index f235f1bd83..0d9e3bb11d 100644 --- a/tests/replication/test_federation_ack.py +++ b/tests/replication/test_federation_ack.py @@ -17,7 +17,7 @@ import mock from synapse.app.generic_worker import GenericWorkerServer from synapse.replication.tcp.commands import FederationAckCommand -from synapse.replication.tcp.protocol import AbstractConnection +from synapse.replication.tcp.protocol import IReplicationConnection from synapse.replication.tcp.streams.federation import FederationStream from tests.unittest import HomeserverTestCase @@ -51,8 +51,10 @@ class FederationAckTestCase(HomeserverTestCase): """ rch = self.hs.get_tcp_replication() - # wire up the ReplicationCommandHandler to a mock connection - mock_connection = mock.Mock(spec=AbstractConnection) + # wire up the ReplicationCommandHandler to a mock connection, which needs + # to implement IReplicationConnection. (Note that Mock doesn't understand + # interfaces, but casing an interface to a list gives the attributes.) + mock_connection = mock.Mock(spec=list(IReplicationConnection)) rch.new_connection(mock_connection) # tell it it received an RDATA row |