diff options
author | Erik Johnston <erik@matrix.org> | 2018-02-15 16:24:07 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-02-15 16:31:59 +0000 |
commit | 3a061cae2626a3aeb680f9100f39c8c7ebf13fef (patch) | |
tree | cbcdbe9bcdf29ab88d610d39079a5b1e316811b0 /tests | |
parent | Ensure that we delete staging push actions on errors (diff) | |
download | synapse-3a061cae2626a3aeb680f9100f39c8c7ebf13fef.tar.xz |
Fix unit test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/storage/test_event_push_actions.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/storage/test_event_push_actions.py b/tests/storage/test_event_push_actions.py index 3135488353..d483e7cf9e 100644 --- a/tests/storage/test_event_push_actions.py +++ b/tests/storage/test_event_push_actions.py @@ -62,6 +62,7 @@ class EventPushActionsStoreTestCase(tests.unittest.TestCase): {"notify_count": noitf_count, "highlight_count": highlight_count} ) + @defer.inlineCallbacks def _inject_actions(stream, action): event = Mock() event.room_id = room_id @@ -69,11 +70,12 @@ class EventPushActionsStoreTestCase(tests.unittest.TestCase): event.internal_metadata.stream_ordering = stream event.depth = stream - tuples = [(user_id, action)] - - return self.store.runInteraction( + yield self.store.add_push_actions_to_staging( + event.event_id, user_id, action, + ) + yield self.store.runInteraction( "", self.store._set_push_actions_for_event_and_users_txn, - event, tuples + event, ) def _rotate(stream): |