def _test_custom_workflow(self, workflow, error_expected=False):
        deployment = deploy(resource("dsl/basic_task_not_exist.yaml"))
        try:
            execute_workflow(workflow, deployment.id)
            if error_expected:
                self.fail('RuntimeError expected')
        except __HOLE__ as e:
            if not error_expected:
                self.fail('Success expected. error message: {0}'.format(e))
            self.assertIn(self.AGENT_ALIVE_FAIL, str(e))
dataset/ETHPy150Open cloudify-cosmo/cloudify-manager/tests/workflow_tests/test_agent_alive_verification.py/TestAgentAliveVerification._test_custom_workflow