diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-05-13 13:42:21 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-05-13 13:42:21 +0100 |
commit | 63878c03794d33a8767425e114845159e5c1cb9a (patch) | |
tree | 0de6af26d7acf38eb0de25adddd0fbe83e58642b /tests/handlers/test_room.py | |
parent | Merge branch 'notifier_unify' into notifier_performance (diff) | |
download | synapse-63878c03794d33a8767425e114845159e5c1cb9a.tar.xz |
Don't bother checking for updates if the stream token hasn't advanced for a user
Diffstat (limited to 'tests/handlers/test_room.py')
-rw-r--r-- | tests/handlers/test_room.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/handlers/test_room.py b/tests/handlers/test_room.py index 6417f73309..a2d7635995 100644 --- a/tests/handlers/test_room.py +++ b/tests/handlers/test_room.py @@ -87,6 +87,8 @@ class RoomMemberHandlerTestCase(unittest.TestCase): self.ratelimiter = hs.get_ratelimiter() self.ratelimiter.send_message.return_value = (True, 0) + self.datastore.persist_event.return_value = (1,1) + @defer.inlineCallbacks def test_invite(self): room_id = "!foo:red" @@ -160,7 +162,7 @@ class RoomMemberHandlerTestCase(unittest.TestCase): event, context=context, ) self.notifier.on_new_room_event.assert_called_once_with( - event, extra_users=[UserID.from_string(target_user_id)] + event, 1, 1, extra_users=[UserID.from_string(target_user_id)] ) self.assertFalse(self.datastore.get_room.called) self.assertFalse(self.datastore.store_room.called) @@ -226,7 +228,7 @@ class RoomMemberHandlerTestCase(unittest.TestCase): event, context=context ) self.notifier.on_new_room_event.assert_called_once_with( - event, extra_users=[user] + event, 1, 1, extra_users=[user] ) join_signal_observer.assert_called_with( @@ -304,7 +306,7 @@ class RoomMemberHandlerTestCase(unittest.TestCase): event, context=context ) self.notifier.on_new_room_event.assert_called_once_with( - event, extra_users=[user] + event, 1, 1, extra_users=[user] ) leave_signal_observer.assert_called_with( |