Fix unit test

This commit is contained in:
Erik Johnston 2018-02-15 16:24:07 +00:00
parent b96278d6fe
commit 3a061cae26

View File

@ -62,6 +62,7 @@ class EventPushActionsStoreTestCase(tests.unittest.TestCase):
{"notify_count": noitf_count, "highlight_count": highlight_count} {"notify_count": noitf_count, "highlight_count": highlight_count}
) )
@defer.inlineCallbacks
def _inject_actions(stream, action): def _inject_actions(stream, action):
event = Mock() event = Mock()
event.room_id = room_id event.room_id = room_id
@ -69,11 +70,12 @@ class EventPushActionsStoreTestCase(tests.unittest.TestCase):
event.internal_metadata.stream_ordering = stream event.internal_metadata.stream_ordering = stream
event.depth = stream event.depth = stream
tuples = [(user_id, action)] yield self.store.add_push_actions_to_staging(
event.event_id, user_id, action,
return self.store.runInteraction( )
yield self.store.runInteraction(
"", self.store._set_push_actions_for_event_and_users_txn, "", self.store._set_push_actions_for_event_and_users_txn,
event, tuples event,
) )
def _rotate(stream): def _rotate(stream):