#NEWLINE# @ mock . patch . object ( irmc_boot , '_attach_virtual_cd' , spec_set = True , autospec = True ) #NEWLINE# @ mock . patch . object ( irmc_boot , '_attach_virtual_fd' , spec_set = True , autospec = True ) #NEWLINE# @ mock . patch . object ( irmc_boot , '_prepare_floppy_image' , spec_set = True , autospec = True ) #NEWLINE# @ mock . patch . object ( irmc_boot , '_detach_virtual_fd' , spec_set = True , autospec = True ) #NEWLINE# @ mock . patch . object ( irmc_boot , '_detach_virtual_cd' , spec_set = True , autospec = True ) #NEWLINE# def test__setup_vmedia_for_boot_with_parameters( self , _detach_virtual_cd_mock , _detach_virtual_fd_mock , _prepare_floppy_image_mock , _attach_virtual_fd_mock , _attach_virtual_cd_mock ) : #NEWLINE# #INDENT# parameters = { #NEWLINE# #INDENT# 'a' : 'b' , #NEWLINE# #UNINDENT# } #NEWLINE# iso_filename = 'deploy_iso_or_boot_iso' #NEWLINE# _prepare_floppy_image_mock . return_value = 'floppy_file_name' #NEWLINE# with task_manager . acquire ( self . context , self . node . uuid , shared = False ) as task : #NEWLINE# #INDENT# irmc_boot . _setup_vmedia_for_boot ( task , iso_filename , parameters ) #NEWLINE# _detach_virtual_cd_mock . assert_called_once_with ( task . node ) #NEWLINE# _detach_virtual_fd_mock . assert_called_once_with ( task . node ) #NEWLINE# _prepare_floppy_image_mock . assert_called_once_with ( task , parameters ) #NEWLINE# _attach_virtual_fd_mock . assert_called_once_with ( task . node , 'floppy_file_name' ) #NEWLINE# _attach_virtual_cd_mock . assert_called_once_with ( task . node , iso_filename )