#NEWLINE# @ mock . patch . object ( manager_utils , 'node_set_boot_device' , spec_set = True , autospec = True ) #NEWLINE# @ mock . patch . object ( irmc_boot , '_setup_vmedia_for_boot' , spec_set = True , autospec = True ) #NEWLINE# @ mock . patch . object ( images , 'fetch' , spec_set = True , autospec = True ) #NEWLINE# def test_setup_deploy_iso_with_image_service( self , fetch_mock , setup_vmedia_mock , set_boot_device_mock ) : #NEWLINE# #INDENT# CONF . irmc . remote_image_share_root = '/' #NEWLINE# with task_manager . acquire ( setup_vmedia_mock . context , self . node . uuid , shared = False ) as task : #NEWLINE# #INDENT# task . node . driver_info [ 'irmc_deploy_iso' ] = 'glance://deploy_iso' #NEWLINE# ramdisk_opts = { #NEWLINE# #INDENT# 'a' : 'b' , #NEWLINE# #UNINDENT# } #NEWLINE# irmc_boot . _setup_deploy_iso ( task , ramdisk_opts ) #NEWLINE# fetch_mock . assert_called_once_with ( task . context , 'glance://deploy_iso' , ( '/deploy-%s.iso' % self . node . uuid ) ) #NEWLINE# setup_vmedia_mock . assert_called_once_with ( task , ( 'deploy-%s.iso' % self . node . uuid ) , ramdisk_opts ) #NEWLINE# set_boot_device_mock . assert_called_once_with ( task , boot_devices . CDROM )