'Tests that the /images registry API returns list of
public images that conforms to a limit query param'

def test_get_index_limit(self):

    UUID3 = _gen_uuid()
    extra_fixture = self.get_fixture(id=UUID3, size=19)
    db_api.image_create(self.context, extra_fixture)
    UUID4 = _gen_uuid()
    extra_fixture = self.get_fixture(id=UUID4)
    db_api.image_create(self.context, extra_fixture)
    res = self.get_api_response_ext(http.OK, url='/images?limit=1')
    res_dict = jsonutils.loads(res.body)
    images = res_dict['images']
    self.assertEqual(1, len(images))
    self.assertEqual(UUID4, images[0]['id'])
