#NEWLINE# @ mock . patch . object ( FAKE_CLIENT . node , 'set_provision_state' ) #NEWLINE# @ mock . patch . object ( ironic_driver . IronicDriver , '_validate_instance_and_node' ) #NEWLINE# def test_destroy_trigger_undeploy_fail( self , fake_validate , mock_sps ) : #NEWLINE# #INDENT# node_uuid = 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' #NEWLINE# node = ironic_utils . get_test_node ( driver = 'fake' , uuid = node , provision_state = ironic_states . ACTIVE ) #NEWLINE# fake_validate . return_value = node #NEWLINE# instance = fake_instance . fake_instance_obj ( self . ctx , node = node_uuid ) #NEWLINE# mock_sps . side_effect = exception . NovaException ( ) #NEWLINE# self . assertRaises ( exception . NovaException , self . driver . destroy , self . ctx , instance , None , None )