summary refs log tree commit diff
path: root/tests/handlers/test_profile.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-01-13 13:15:51 +0000
committerDavid Baker <dave@matrix.org>2015-01-13 13:15:51 +0000
commitc06a9063e1d838f776edfd79cfc8ab29c748d794 (patch)
treebcfa472e65d4dacbab666d5787eff9293e5ccc41 /tests/handlers/test_profile.py
parentSplit out function to decide whether to notify or a given event (diff)
parentMerge branch 'hotfixes-v0.6.1b' of github.com:matrix-org/synapse into develop (diff)
downloadsynapse-c06a9063e1d838f776edfd79cfc8ab29c748d794.tar.xz
Merge branch 'develop' into pushers
Diffstat (limited to 'tests/handlers/test_profile.py')
-rw-r--r--tests/handlers/test_profile.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/handlers/test_profile.py b/tests/handlers/test_profile.py
index 1660e7e928..25b172aa5e 100644
--- a/tests/handlers/test_profile.py
+++ b/tests/handlers/test_profile.py
@@ -17,7 +17,7 @@
 from tests import unittest
 from twisted.internet import defer
 
-from mock import Mock
+from mock import Mock, NonCallableMock
 
 from synapse.api.errors import AuthError
 from synapse.server import HomeServer
@@ -59,7 +59,14 @@ class ProfileTestCase(unittest.TestCase):
                 resource_for_federation=Mock(),
                 replication_layer=self.mock_federation,
                 config=self.mock_config,
+                ratelimiter=NonCallableMock(spec_set=[
+                    "send_message",
+                ])
             )
+
+        self.ratelimiter = hs.get_ratelimiter()
+        self.ratelimiter.send_message.return_value = (True, 0)
+
         hs.handlers = ProfileHandlers(hs)
 
         self.store = hs.get_datastore()