#NEWLINE# @ mock . patch . object ( images , 'create_isolinux_image_for_bios' , autospec = True ) #NEWLINE# @ mock . patch . object ( images , 'fetch' , autospec = True ) #NEWLINE# @ mock . patch . object ( utils , 'tempdir' , autospec = True ) #NEWLINE# def test_create_boot_iso_for_bios_with_no_boot_mode( self , tempdir_mock , fetch_images_mock , create_isolinux_mock ) : #NEWLINE# #INDENT# mock_file_handle = mock . MagicMock ( spec = file ) #NEWLINE# mock_file_handle . __enter__ . return_value = 'tmpdir' #NEWLINE# tempdir_mock . return_value = mock_file_handle #NEWLINE# images . create_boot_iso ( 'ctx' , 'output_file' , 'kernel-uuid' , 'ramdisk-uuid' , 'deploy_iso-uuid' , 'root-uuid' , 'kernel-params' , None ) #NEWLINE# fetch_images_mock . assert_any_call ( 'ctx' , 'kernel-uuid' , 'tmpdir/kernel-uuid' ) #NEWLINE# fetch_images_mock . assert_any_call ( 'ctx' , 'ramdisk-uuid' , 'tmpdir/ramdisk-uuid' ) #NEWLINE# params = [ 'root=UUID=root-uuid' , 'kernel-params' ] #NEWLINE# create_isolinux_mock . assert_called_once_with ( 'output_file' , 'tmpdir/kernel-uuid' , 'tmpdir/ramdisk-uuid' , params )