'Test verify_metadata updates metadata with cached image size for images
with 0 size.
:param image_meta: Image metadata, which may be either an ImageTarget
instance or a legacy v1 dict.'

def _test_verify_metadata_zero_size(self, image_meta):

    image_size = 1
    cache_filter = ProcessRequestTestCacheFilter()
    with patch.object(cache_filter.cache, 'get_image_size', return_value=image_size):
        cache_filter._verify_metadata(image_meta)
    self.assertEqual(image_size, image_meta['size'])
