#NEWLINE# @ mock . patch . object ( volumeops . VMwareVolumeOps , '_get_vmdk_base_volume_device' ) #NEWLINE# @ mock . patch . object ( volumeops . VMwareVolumeOps , '_relocate_vmdk_volume' ) #NEWLINE# def test_consolidate_vmdk_volume_with_no_relocate( self , relocate_vmdk_volume , get_vmdk_base_volume_device ) : #NEWLINE# #INDENT# file_name = mock . sentinel . file_name #NEWLINE# backing = mock . Mock ( fileName = file_name ) #NEWLINE# original_device = mock . Mock ( backing = backing ) #NEWLINE# get_vmdk_base_volume_device . return_value = original_device #NEWLINE# device = mock . Mock ( backing = backing ) #NEWLINE# volume_ref = mock . sentinel . volume_ref #NEWLINE# vm_ref = mock . sentinel . vm_ref #NEWLINE# self . _volumeops . _consolidate_vmdk_volume ( self . _instance , vm_ref , device , volume_ref ) #NEWLINE# get_vmdk_base_volume_device . assert_called_once_with ( volume_ref ) #NEWLINE# self . assertFalse ( relocate_vmdk_volume . called )