@mock.patch.object(action_db_util, 'get_action_by_ref',
                       mock.MagicMock(return_value=None))
    @mock.patch.object(action_service, 'request',
                       return_value=(DummyActionExecution(result={'raw_out': 'published'}), None))
    def test_action_chain_runner_referenced_action_doesnt_exist(self, mock_request):
        # Action referenced by a task doesn't exist, should result in a top level error
        chain_runner = acr.get_runner()
        chain_runner.entry_point = CHAIN_WITH_INVALID_ACTION
        chain_runner.action = ACTION_2
        chain_runner.container_service = RunnerContainerService()
        chain_runner.pre_run()

        action_parameters = {}
        status, output, _ = chain_runner.run(action_parameters=action_parameters)

        expected_error = ('Failed to run task "c1". Action with reference "wolfpack.a2" '
                          'doesn\'t exist.')
        self.assertEqual(status, LIVEACTION_STATUS_FAILED)
        self.assertTrue(expected_error in output['error'])
        self.assertTrue(output['traceback'] in 'Traceback', output['traceback'])
dataset/ETHPy150Open StackStorm/st2/st2actions/tests/unit/test_actionchain.py/TestActionChainRunner.test_action_chain_runner_referenced_action_doesnt_exist/swapped operands of `in`