diff options
author | Mark Haines <mjark@negativecurvature.net> | 2014-10-14 10:06:04 +0100 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2014-10-14 10:06:04 +0100 |
commit | 636a0dbde7082a485c0d4ac58137ecb75f7f23fe (patch) | |
tree | 780ad4589dbde7e0fab416496faee5f3c351d169 /tests/federation | |
parent | Replace on_send_callback with something a bit clearer so that we can sign mes... (diff) | |
parent | typoe (diff) | |
download | synapse-636a0dbde7082a485c0d4ac58137ecb75f7f23fe.tar.xz |
Merge pull request #8 from matrix-org/server2server_signing
Server2server signing
Diffstat (limited to 'tests/federation')
-rw-r--r-- | tests/federation/test_federation.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/federation/test_federation.py b/tests/federation/test_federation.py index d95b9013a3..8d277d6612 100644 --- a/tests/federation/test_federation.py +++ b/tests/federation/test_federation.py @@ -19,7 +19,7 @@ from tests import unittest # python imports from mock import Mock, ANY -from ..utils import MockHttpResource, MockClock +from ..utils import MockHttpResource, MockClock, MockKey from synapse.server import HomeServer from synapse.federation import initialize_http_replication @@ -64,6 +64,8 @@ class FederationTestCase(unittest.TestCase): self.mock_persistence.get_received_txn_response.return_value = ( defer.succeed(None) ) + self.mock_config = Mock() + self.mock_config.signing_key = [MockKey()] self.clock = MockClock() hs = HomeServer("test", resource_for_federation=self.mock_resource, @@ -71,6 +73,8 @@ class FederationTestCase(unittest.TestCase): db_pool=None, datastore=self.mock_persistence, clock=self.clock, + config=self.mock_config, + keyring=Mock(), ) self.federation = initialize_http_replication(hs) self.distributor = hs.get_distributor() @@ -182,7 +186,7 @@ class FederationTestCase(unittest.TestCase): }, ] }, - on_send_callback=ANY, + json_data_callback=ANY, ) @defer.inlineCallbacks @@ -214,9 +218,10 @@ class FederationTestCase(unittest.TestCase): } ], }, - on_send_callback=ANY, + json_data_callback=ANY, ) + @defer.inlineCallbacks def test_recv_edu(self): recv_observer = Mock() |