summary refs log tree commit diff
path: root/tests/replication
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <daniel@matrix.org>2016-03-03 16:43:42 +0000
committerDaniel Wagner-Hall <daniel@matrix.org>2016-03-03 16:43:42 +0000
commitb4022cc487921ec46942a6a72fb174bb7aa1e459 (patch)
tree7aa3d0948b96053a705e2150318cb76fba189f38 /tests/replication
parentMerge pull request #571 from matrix-org/daniel/asids (diff)
downloadsynapse-b4022cc487921ec46942a6a72fb174bb7aa1e459.tar.xz
Pass whole requester to ratelimiting
This will enable more detailed decisions
Diffstat (limited to 'tests/replication')
-rw-r--r--tests/replication/test_resource.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/replication/test_resource.py b/tests/replication/test_resource.py
index 38daaf87e2..daabc563b4 100644
--- a/tests/replication/test_resource.py
+++ b/tests/replication/test_resource.py
@@ -18,7 +18,7 @@ from synapse.types import Requester, UserID
 
 from twisted.internet import defer
 from tests import unittest
-from tests.utils import setup_test_homeserver
+from tests.utils import setup_test_homeserver, requester_for_user
 from mock import Mock, NonCallableMock
 import json
 import contextlib
@@ -133,12 +133,15 @@ class ReplicationResourceCase(unittest.TestCase):
     @defer.inlineCallbacks
     def send_text_message(self, room_id, message):
         handler = self.hs.get_handlers().message_handler
-        event = yield handler.create_and_send_nonmember_event({
-            "type": "m.room.message",
-            "content": {"body": "message", "msgtype": "m.text"},
-            "room_id": room_id,
-            "sender": self.user.to_string(),
-        })
+        event = yield handler.create_and_send_nonmember_event(
+            requester_for_user(self.user),
+            {
+                "type": "m.room.message",
+                "content": {"body": "message", "msgtype": "m.text"},
+                "room_id": room_id,
+                "sender": self.user.to_string(),
+            }
+        )
         defer.returnValue(event.event_id)
 
     @defer.inlineCallbacks