'Tests that the /images/detail registry API returns list of
public images that have a specific container_format'

def test_get_details_filter_container_format(self):

    extra_fixture = self.get_fixture(id=_gen_uuid(), disk_format='vdi', size=19)
    db_api.image_create(self.context, extra_fixture)
    extra_fixture = self.get_fixture(id=_gen_uuid(), disk_format='ami', container_format='ami', size=19)
    db_api.image_create(self.context, extra_fixture)
    url = '/images/detail?container_format=ovf'
    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.assertEqual('ovf', image['container_format'])
