'Tests that the /images registry API returns list of
public images that have a specific name. This is really a sanity
check, filtering is tested more in-depth using /images/detail'

def test_get_index_filter_name(self):

    extra_fixture = self.get_fixture(id=_gen_uuid(), name='new    name!    #123', size=19)
    db_api.image_create(self.context, extra_fixture)
    extra_fixture = self.get_fixture(id=_gen_uuid(), name='new    name!    #123')
    db_api.image_create(self.context, extra_fixture)
    res = self.get_api_response_ext(http.OK, url='/images?name=new    name!    #123')
    res_dict = jsonutils.loads(res.body)
    images = res_dict['images']
    self.assertEqual(2, len(images))
    for image in images:
        self.assertEqual('new    name!    #123', image['name'])
