diff options
author | David Baker <dave@matrix.org> | 2015-04-17 13:51:10 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-04-17 13:51:10 +0100 |
commit | cb03fafdf150cb97d494c1a12efb730e01309fb2 (patch) | |
tree | 5c6994f2ec826599984d7a621caeb889aeef4c57 /tests/rest | |
parent | Register the 3pid servlet (diff) | |
parent | Filter typing nofication events to only those rooms the requesting user is a ... (diff) | |
download | synapse-cb03fafdf150cb97d494c1a12efb730e01309fb2.tar.xz |
Merge branch 'develop' into csauth
Diffstat (limited to 'tests/rest')
-rw-r--r-- | tests/rest/client/v1/test_typing.py | 7 |
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 3442e6ede5..7d8b1c2683 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, |