'As admin role, create an image with protected property, and verify
permitted role \'member\' can can delete that protected property'

def test_prop_protection_with_delete_and_permitted_policy(self):

    self.set_property_protections(use_policies=True)
    image_id = self._create_admin_image({'x-image-meta-property-x_owner_foo': 'bar'})
    another_request = unit_test_utils.get_fake_request(path=('/images/%s' % image_id), method='PUT')
    headers = {'x-auth-token': 'user:tenant:member', 'X-Glance-Registry-Purge-Props': 'True'}
    for (k, v) in six.iteritems(headers):
        another_request.headers[k] = v
    output = another_request.get_response(self.api)
    res_body = jsonutils.loads(output.body)['image']
    self.assertEqual({}, res_body['properties'])
