#NEWLINE# @ mock . patch . object ( objects . Instance , 'refresh' ) #NEWLINE# @ mock . patch . object ( ironic_driver . IronicDriver , '_validate_instance_and_node' ) #NEWLINE# def _wait_for_active_abort( self , instance_params , fake_validate , fake_refresh ) : #NEWLINE# #INDENT# instance = fake_instance . fake_instance_obj ( self . ctx , uuid = uuidutils . generate_uuid ( ) , ** instance_params ) #NEWLINE# self . assertRaises ( exception . InstanceDeployFailure , self . driver . _wait_for_active , instance ) #NEWLINE# self . assertFalse ( fake_validate . called ) #NEWLINE# fake_refresh . assert_called_once_with ( )