#NEWLINE# @ mock . patch . object ( manager_utils , 'node_set_boot_device' , spec_set = True , autospec = True ) #NEWLINE# @ mock . patch . object ( irmc_boot , '_cleanup_vmedia_boot' , spec_set = True , autospec = True ) #NEWLINE# def _test_prepare_instance_whole_disk_image( self , _cleanup_vmedia_boot_mock , set_boot_device_mock ) : #NEWLINE# #INDENT# self . node . driver_internal_info = { #NEWLINE# #INDENT# 'is_whole_disk_image' : True , #NEWLINE# #UNINDENT# } #NEWLINE# self . node . save ( ) #NEWLINE# with task_manager . acquire ( self . context , self . node . uuid , shared = False ) as task : #NEWLINE# #INDENT# task . driver . boot . prepare_instance ( _cleanup_vmedia_boot_mock ) #NEWLINE# _cleanup_vmedia_boot_mock . assert_called_once_with ( task ) #NEWLINE# set_boot_device_mock . assert_called_once_with ( task , boot_devices . DISK , persistent = True )