summary refs log tree commit diff
path: root/tests/rest
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-17 11:22:31 +0100
committerErik Johnston <erik@matrix.org>2015-04-17 11:22:31 +0100
commit6ba2e3df4e72aa7fea6cbba48aa669ed06f29453 (patch)
tree0cb4408ef42387011828b7843f58078afe512d68 /tests/rest
parentFix port script after storage changes. Add very simple (off by default) curse... (diff)
parentAdd kick users script (diff)
downloadsynapse-6ba2e3df4e72aa7fea6cbba48aa669ed06f29453.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into postgres
Diffstat (limited to 'tests/rest')
-rw-r--r--tests/rest/client/v1/test_typing.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/rest/client/v1/test_typing.py b/tests/rest/client/v1/test_typing.py
index 80f2ec9ddf..7b3bd87439 100644
--- a/tests/rest/client/v1/test_typing.py
+++ b/tests/rest/client/v1/test_typing.py
@@ -34,6 +34,8 @@ class RoomTypingTestCase(RestTestCase):
     """ Tests /rooms/$room_id/typing/$user_id REST API. """
     user_id = "@sid:red"
 
+    user = UserID.from_string(user_id)
+
     @defer.inlineCallbacks
     def setUp(self):
         self.clock = MockClock()
@@ -75,7 +77,7 @@ class RoomTypingTestCase(RestTestCase):
 
         def get_room_members(room_id):
             if room_id == self.room_id:
-                return defer.succeed([UserID.from_string(self.user_id)])
+                return defer.succeed([self.user])
             else:
                 return defer.succeed([])
 
@@ -115,8 +117,9 @@ class RoomTypingTestCase(RestTestCase):
         self.assertEquals(200, code)
 
         self.assertEquals(self.event_source.get_current_key(), 1)
+        events = yield self.event_source.get_new_events_for_user(self.user, 0, None)
         self.assertEquals(
-            self.event_source.get_new_events_for_user(self.user_id, 0, None)[0],
+            events[0],
             [
                 {"type": "m.typing",
                  "room_id": self.room_id,