async def METHOD_NAME(self, command_event_type_data):
    work_context = WorkContextFactory()
    script = work_context.new_script()
    future_result = script.run("/some/cmd", 1)
    events = []
    await script._before()
    for command_event_type, command_event_data in command_event_type_data:
        event = script.process_batch_event(command_event_type, command_event_data)
        events.append(event)
    assert future_result.done()
    assert future_result.result() == script.results[0]
    assert future_result.result() == events[-1]