#NEWLINE# def test__cleanup_images( self ) : #NEWLINE# #INDENT# self . context . _created_images = [ fakes . FakeImage ( id = 'id1' ) , fakes . FakeImage ( id = 'id2' ) ] #NEWLINE# self . context . conf . set ( 'compute' , 'image_ref' , 'id1' ) #NEWLINE# self . context . conf . set ( 'compute' , 'image_ref_alt' , 'id2' ) #NEWLINE# self . context . _cleanup_images ( ) #NEWLINE# client = self . context . clients . glance ( ) #NEWLINE# self . assertEqual ( self . images . delete . call_count , 2 ) #NEWLINE# self . assertEqual ( '' , self . context . conf . get ( 'compute' , 'image_ref' ) ) #NEWLINE# self . assertEqual ( '' , self . context . conf . get ( 'compute' , 'image_ref_alt' ) )