#NEWLINE# @ mock . patch . object ( os . path , 'isfile' , spec_set = True , autospec = True ) #NEWLINE# def test__parse_driver_info_with_deploy_iso_invalid( self , isfile_mock ) : #NEWLINE# #INDENT# "With required 'irmc_deploy_iso' non existed." #NEWLINE# isfile_mock . return_value = False #NEWLINE# with task_manager . acquire ( self . context , self . node . uuid ) as task : #NEWLINE# #INDENT# task . node . driver_info [ 'irmc_deploy_iso' ] = 'deploy.iso' #NEWLINE# error_msg = ( _ ( 'Deploy ISO file, %(deploy_iso)s, not found for node: %(node)s.' ) % { #NEWLINE# #INDENT# 'deploy_iso' : '/remote_image_share_root/deploy.iso' , #NEWLINE# 'node' : task . node . uuid , #NEWLINE# #UNINDENT# } ) #NEWLINE# e = self . assertRaises ( exception . InvalidParameterValue , irmc_boot . _parse_driver_info , task . node ) #NEWLINE# self . assertEqual ( error_msg , str ( e ) )