summary refs log tree commit diff
path: root/tests/handlers/test_typing.py
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2014-10-14 10:06:04 +0100
committerMark Haines <mjark@negativecurvature.net>2014-10-14 10:06:04 +0100
commit636a0dbde7082a485c0d4ac58137ecb75f7f23fe (patch)
tree780ad4589dbde7e0fab416496faee5f3c351d169 /tests/handlers/test_typing.py
parentReplace on_send_callback with something a bit clearer so that we can sign mes... (diff)
parenttypoe (diff)
downloadsynapse-636a0dbde7082a485c0d4ac58137ecb75f7f23fe.tar.xz
Merge pull request #8 from matrix-org/server2server_signing
Server2server signing
Diffstat (limited to 'tests/handlers/test_typing.py')
-rw-r--r--tests/handlers/test_typing.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/handlers/test_typing.py b/tests/handlers/test_typing.py

index a66f208abf..064b04c217 100644 --- a/tests/handlers/test_typing.py +++ b/tests/handlers/test_typing.py
@@ -20,7 +20,7 @@ from twisted.internet import defer from mock import Mock, call, ANY import json -from ..utils import MockHttpResource, MockClock, DeferredMockCallable +from ..utils import MockHttpResource, MockClock, DeferredMockCallable, MockKey from synapse.server import HomeServer from synapse.handlers.typing import TypingNotificationHandler @@ -61,6 +61,9 @@ class TypingNotificationsTestCase(unittest.TestCase): self.mock_federation_resource = MockHttpResource() + self.mock_config = Mock() + self.mock_config.signing_key = [MockKey()] + hs = HomeServer("test", clock=self.clock, db_pool=None, @@ -75,6 +78,8 @@ class TypingNotificationsTestCase(unittest.TestCase): resource_for_client=Mock(), resource_for_federation=self.mock_federation_resource, http_client=self.mock_http_client, + config=self.mock_config, + keyring=Mock(), ) hs.handlers = JustTypingNotificationHandlers(hs) @@ -170,7 +175,7 @@ class TypingNotificationsTestCase(unittest.TestCase): "typing": True, } ), - on_send_callback=ANY, + json_data_callback=ANY, ), defer.succeed((200, "OK")) ) @@ -221,7 +226,7 @@ class TypingNotificationsTestCase(unittest.TestCase): "typing": False, } ), - on_send_callback=ANY, + json_data_callback=ANY, ), defer.succeed((200, "OK")) )