summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/federation/test_federation.py1
-rw-r--r--tests/handlers/test_presence.py9
-rw-r--r--tests/handlers/test_typing.py1
3 files changed, 8 insertions, 3 deletions
diff --git a/tests/federation/test_federation.py b/tests/federation/test_federation.py
index eafc7879e0..c893c4863d 100644
--- a/tests/federation/test_federation.py
+++ b/tests/federation/test_federation.py
@@ -74,6 +74,7 @@ class FederationTestCase(unittest.TestCase):
                 datastore=self.mock_persistence,
                 clock=self.clock,
                 config=self.mock_config,
+                keyring=Mock(),
         )
         self.federation = initialize_http_replication(hs)
         self.distributor = hs.get_distributor()
diff --git a/tests/handlers/test_presence.py b/tests/handlers/test_presence.py
index fe4b892ffb..c9406b70c4 100644
--- a/tests/handlers/test_presence.py
+++ b/tests/handlers/test_presence.py
@@ -17,7 +17,7 @@
 from tests import unittest
 from twisted.internet import defer, reactor
 
-from mock import Mock, call, ANY, NonCallableMock
+from mock import Mock, call, ANY, NonCallableMock, patch
 import json
 
 from tests.utils import (
@@ -59,7 +59,6 @@ class JustPresenceHandlers(object):
     def __init__(self, hs):
         self.presence_handler = PresenceHandler(hs)
 
-
 class PresenceStateTestCase(unittest.TestCase):
     """ Tests presence management. """
 
@@ -78,6 +77,7 @@ class PresenceStateTestCase(unittest.TestCase):
             resource_for_federation=Mock(),
             http_client=None,
             config=self.mock_config,
+            keyring=Mock(),
         )
         hs.handlers = JustPresenceHandlers(hs)
 
@@ -230,6 +230,7 @@ class PresenceInvitesTestCase(unittest.TestCase):
             resource_for_federation=self.mock_federation_resource,
             http_client=self.mock_http_client,
             config=self.mock_config,
+            keyring=Mock(),
         )
         hs.handlers = JustPresenceHandlers(hs)
 
@@ -533,6 +534,7 @@ class PresencePushTestCase(unittest.TestCase):
                 resource_for_federation=self.mock_federation_resource,
                 http_client=self.mock_http_client,
                 config=self.mock_config,
+                keyring=Mock(),
             )
         hs.handlers = JustPresenceHandlers(hs)
 
@@ -1025,7 +1027,8 @@ class PresencePollingTestCase(unittest.TestCase):
                 resource_for_client=Mock(),
                 resource_for_federation=self.mock_federation_resource,
                 http_client=self.mock_http_client,
-                config = self.mock_config,
+                config=self.mock_config,
+                keyring=Mock(),
             )
         hs.handlers = JustPresenceHandlers(hs)
 
diff --git a/tests/handlers/test_typing.py b/tests/handlers/test_typing.py
index 0ab829b9ad..ff40343b8c 100644
--- a/tests/handlers/test_typing.py
+++ b/tests/handlers/test_typing.py
@@ -79,6 +79,7 @@ class TypingNotificationsTestCase(unittest.TestCase):
                 resource_for_federation=self.mock_federation_resource,
                 http_client=self.mock_http_client,
                 config=self.mock_config,
+                keyring=Mock(),
             )
         hs.handlers = JustTypingNotificationHandlers(hs)