#NEWLINE# def test_handle_base_image_used_missing( self ) : #NEWLINE# #INDENT# img = '123' #NEWLINE# with utils . tempdir ( ) as tmpdir : #NEWLINE# #INDENT# self . flags ( instances_path = tmpdir ) #NEWLINE# self . flags ( image_info_filename_pattern = '$instances_path/%(image)s.info' , group = 'libvirt' ) #NEWLINE# fname = os . path . join ( tmpdir , 'aaa' ) #NEWLINE# image_cache_manager = imagecache . ImageCacheManager ( ) #NEWLINE# image_cache_manager . unexplained_images = [ fname ] #NEWLINE# image_cache_manager . used_images = { #NEWLINE# #INDENT# '123' : ( 1 , 0 , [ 'banana-42' ] ) , #NEWLINE# #UNINDENT# } #NEWLINE# image_cache_manager . _handle_base_image ( img , fname ) #NEWLINE# self . assertEqual ( image_cache_manager . unexplained_images , [ ] ) #NEWLINE# self . assertEqual ( image_cache_manager . removable_base_files , [ ] ) #NEWLINE# self . assertEqual ( image_cache_manager . corrupt_base_files , [ ] )