#NEWLINE# @ mock . patch . object ( manager_utils , 'node_set_boot_device' , autospec = True ) #NEWLINE# def test_try_set_boot_device_some_other_exception( self , node_set_boot_device_mock ) : #NEWLINE# #INDENT# exc = exception . IloOperationError ( operation = 'qwe' , error = 'error' ) #NEWLINE# node_set_boot_device_mock . side_effect = iter ( [ exc ] ) #NEWLINE# with task_manager . acquire ( self . context , self . node . uuid , shared = False ) as task : #NEWLINE# #INDENT# self . assertRaises ( exception . IloOperationError , utils . try_set_boot_device , node_set_boot_device_mock , boot_devices . DISK , persistent = True ) #NEWLINE# node_set_boot_device_mock . assert_called_once_with ( task , boot_devices . DISK , persistent = True )