'Tests that the /images/detail registry API returns list of
public images that have a size less than or equal to size_max
and greater than or equal to size_min'

def test_get_details_filter_size_min_max(self):

    extra_fixture = self.get_fixture(id=_gen_uuid(), size=18)
    db_api.image_create(self.context, extra_fixture)
    extra_fixture = self.get_fixture(id=_gen_uuid(), disk_format='ami', container_format='ami')
    db_api.image_create(self.context, extra_fixture)
    extra_fixture = self.get_fixture(id=_gen_uuid(), size=6)
    db_api.image_create(self.context, extra_fixture)
    url = '/images/detail?size_min=18&size_max=19'
    res = self.get_api_response_ext(http.OK, url=url)
    res_dict = jsonutils.loads(res.body)
    images = res_dict['images']
    self.assertEqual(2, len(images))
    for image in images:
        self.assertTrue((18 <= image['size'] <= 19))
