#NEWLINE# @ mock . patch . object ( vm_utils , 'lookup' , side_effect = [ None , None ] ) #NEWLINE# @ mock . patch . object ( vm_utils , 'hard_shutdown_vm' ) #NEWLINE# @ mock . patch . object ( volume_utils , 'find_sr_by_uuid' ) #NEWLINE# @ mock . patch . object ( volume_utils , 'forget_sr' ) #NEWLINE# def test_no_vm_no_bdm( self , forget_sr , find_sr_by_uuid , hard_shutdown_vm , lookup ) : #NEWLINE# #INDENT# self . vmops . destroy ( self . instance , 'network_info' , { #NEWLINE# #INDENT# 'block_device_mapping' : [ ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( 0 , find_sr_by_uuid . call_count ) #NEWLINE# self . assertEqual ( 0 , forget_sr . call_count ) #NEWLINE# self . assertEqual ( 0 , hard_shutdown_vm . call_count )