summary refs log tree commit diff
path: root/tests/storage
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-02-16 11:52:51 +0000
committerGitHub <noreply@github.com>2018-02-16 11:52:51 +0000
commitbf5ef10a93c0f39c4260b341cc0eca61d143f154 (patch)
tree2fc05e9438db06f200bee80be9b4d4fff67d5ff1 /tests/storage
parentMerge pull request #2873 from matrix-org/erikj/event_creator_no_state (diff)
parentFix typo of double is_highlight (diff)
downloadsynapse-bf5ef10a93c0f39c4260b341cc0eca61d143f154.tar.xz
Merge pull request #2874 from matrix-org/erikj/creator_push_actions
Store push actions in DB staging area instead of context
Diffstat (limited to 'tests/storage')
-rw-r--r--tests/storage/test_event_push_actions.py10
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):