summary refs log tree commit diff
path: root/tests/replication
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-03-04 14:44:34 +0000
committerMark Haines <mark.haines@matrix.org>2016-03-04 14:44:34 +0000
commitec7460b4f2da70ae3ea4ddaa4a198d9dd193a045 (patch)
tree2dddf9f52591a392295bbace7a9494ab423c7cfd /tests/replication
parentHook up the push rules stream to account_data in /sync (diff)
parentMerge pull request #598 from Rugvip/invite-state (diff)
downloadsynapse-ec7460b4f2da70ae3ea4ddaa4a198d9dd193a045.tar.xz
Merge branch 'develop' into markjh/pushrule_stream
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 a30d59a865..4a42eb3365 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
@@ -135,12 +135,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