'Test process_request for v1 api where _member_ role not able to
download the image with custom property.'

def test_v1_process_request_download_restricted(self):

    image_id = 'test1'
    def fake_get_v1_image_metadata(*args, **kwargs):
        return {'id': image_id, 'name': 'fake_image', 'status': 'active', 'created_at': '', 'min_disk': '10G', 'min_ram': '1024M', 'protected': False, 'locations': '', 'checksum': 'c1234', 'owner': '', 'disk_format': 'raw', 'container_format': 'bare', 'size': '123456789', 'virtual_size': '123456789', 'is_public': 'public', 'deleted': False, 'updated_at': '', 'x_test_key': 'test_1234'}
    enforcer = self._enforcer_from_rules({'restricted': "not    ('test_1234':%(x_test_key)s    and    role:_member_)", 'download_image': 'role:admin    or    rule:restricted'})
    request = webob.Request.blank(('/v1/images/%s' % image_id))
    request.context = context.RequestContext(roles=['_member_'])
    cache_filter = ProcessRequestTestCacheFilter()
    cache_filter._get_v1_image_metadata = fake_get_v1_image_metadata
    cache_filter.policy = enforcer
    self.assertRaises(webob.exc.HTTPForbidden, cache_filter.process_request, request)
