#NEWLINE# def _test_custom_workflow( self , workflow , error_expected = False ) : #NEWLINE# #INDENT# deployment = deploy ( resource ( 'dsl/basic_task_not_exist.yaml' ) ) #NEWLINE# try : #NEWLINE# #INDENT# execute_workflow ( workflow , deployment . id ) #NEWLINE# if error_expected : #NEWLINE# #INDENT# self . fail ( 'RuntimeError expected' ) #NEWLINE# #UNINDENT# #UNINDENT# except RuntimeError as e : #NEWLINE# #INDENT# if ( not error_expected ) : #NEWLINE# #INDENT# self . fail ( 'Success expected. error message: {0}' . format ( e ) ) #NEWLINE# #UNINDENT# self . assertIn ( deployment . AGENT_ALIVE_FAIL , str ( e ) )