summary refs log tree commit diff
path: root/tests/federation
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-10-16 00:09:48 +0100
committerMark Haines <mark.haines@matrix.org>2014-10-16 00:09:48 +0100
commit66104da10c4191aa1e048f2379190574755109e6 (patch)
tree6b98f50ebaef2b75c78368174ddb939c3e95200e /tests/federation
parentpersist hashes and origin signatures for PDUs (diff)
downloadsynapse-66104da10c4191aa1e048f2379190574755109e6.tar.xz
Sign outgoing PDUs.
Diffstat (limited to 'tests/federation')
-rw-r--r--tests/federation/test_pdu_codec.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/federation/test_pdu_codec.py b/tests/federation/test_pdu_codec.py
index 344e1baf60..80851a4258 100644
--- a/tests/federation/test_pdu_codec.py
+++ b/tests/federation/test_pdu_codec.py
@@ -23,14 +23,21 @@ from synapse.federation.units import Pdu
 
 from synapse.server import HomeServer
 
-from mock import Mock
+from mock import Mock, NonCallableMock
+
+from ..utils import MockKey
 
 
 class PduCodecTestCase(unittest.TestCase):
     def setUp(self):
-        self.hs = HomeServer("blargle.net")
-        self.event_factory = self.hs.get_event_factory()
+        self.mock_config = NonCallableMock()
+        self.mock_config.signing_key = [MockKey()]
 
+        self.hs = HomeServer(
+            "blargle.net",
+            config=self.mock_config,
+        )
+        self.event_factory = self.hs.get_event_factory()
         self.codec = PduCodec(self.hs)
 
     def test_decode_event_id(self):