summary refs log tree commit diff
path: root/tests/handlers/test_presencelike.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-21 11:47:45 +0000
committerErik Johnston <erik@matrix.org>2014-12-21 11:47:45 +0000
commit74ee4048c2b0cb2fa7fb1e80027de37979b5dd86 (patch)
treeacd6ec851f1b951f87f6c5360bbe6d2b358be64a /tests/handlers/test_presencelike.py
parentMerge branch 'hotfixes-v0.6.0' of github.com:matrix-org/synapse into erikj-perf (diff)
parentMerge branch 'hotfixes-v0.6.0' (diff)
downloadsynapse-74ee4048c2b0cb2fa7fb1e80027de37979b5dd86.tar.xz
Merge branch 'master' of github.com:matrix-org/synapse into erikj-perf
Diffstat (limited to 'tests/handlers/test_presencelike.py')
-rw-r--r--tests/handlers/test_presencelike.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/handlers/test_presencelike.py b/tests/handlers/test_presencelike.py
index 532ecf0f2c..0584e4c8b9 100644
--- a/tests/handlers/test_presencelike.py
+++ b/tests/handlers/test_presencelike.py
@@ -19,7 +19,7 @@ presence and profiles; namely, the displayname and avatar_url."""
 from tests import unittest
 from twisted.internet import defer
 
-from mock import Mock, call, ANY
+from mock import Mock, call, ANY, NonCallableMock
 
 from ..utils import MockClock, MockKey
 
@@ -75,8 +75,13 @@ class PresenceProfilelikeDataTestCase(unittest.TestCase):
                 resource_for_federation=Mock(),
                 http_client=None,
                 replication_layer=MockReplication(),
-                config=self.mock_config,
-            )
+                ratelimiter=NonCallableMock(spec_set=[
+                "send_message",
+                ]),
+                config=self.mock_config
+        )
+        self.ratelimiter = hs.get_ratelimiter()
+        self.ratelimiter.send_message.return_value = (True, 0)
         hs.handlers = PresenceAndProfileHandlers(hs)
 
         self.datastore = hs.get_datastore()