#NEWLINE# @ mock . patch . object ( irmc_common , 'get_irmc_client' , spec_set = True , autospec = True ) #NEWLINE# def test__attach_virtual_fd_ok( self , get_irmc_client_mock ) : #NEWLINE# #INDENT# irmc_client = get_irmc_client_mock . return_value #NEWLINE# irmc_boot . scci . get_virtual_fd_set_params_cmd = mock . MagicMock ( sepc_set = [ ] ) #NEWLINE# fd_set_params = irmc_boot . scci . get_virtual_fd_set_params_cmd . return_value #NEWLINE# CONF . irmc . remote_image_server = '10.20.30.40' #NEWLINE# CONF . irmc . remote_image_user_domain = 'local' #NEWLINE# CONF . irmc . remote_image_share_type = 'NFS' #NEWLINE# CONF . irmc . remote_image_share_name = 'share' #NEWLINE# CONF . irmc . remote_image_user_name = 'admin' #NEWLINE# CONF . irmc . remote_image_user_password = 'admin0' #NEWLINE# irmc_boot . scci . get_share_type . return_value = 0 #NEWLINE# with task_manager . acquire ( self . context , self . node . uuid , shared = False ) as task : #NEWLINE# #INDENT# irmc_boot . _attach_virtual_fd ( task . node , 'floppy_image_filename' ) #NEWLINE# get_irmc_client_mock . assert_called_once_with ( task . node ) #NEWLINE# irmc_boot . scci . get_virtual_fd_set_params_cmd . assert_called_once_with ( '10.20.30.40' , 'local' , 0 , 'share' , 'floppy_image_filename' , 'admin' , 'admin0' ) #NEWLINE# irmc_client . assert_has_calls ( [ mock . call ( fd_set_params , async = False ) , mock . call ( irmc_boot . scci . MOUNT_FD , async = False ) ] )