'Verify when updating props that ones we don\'t have read permission for
are not disclosed'

def test_read_protected_props_leak_with_update(self):

    image_id = self._create_admin_image({'x-image-meta-property-spl_update_prop': '0', 'x-image-meta-property-foo': 'bar'})
    another_request = unit_test_utils.get_fake_request(path=('/images/%s' % image_id), method='PUT')
    headers = {'x-auth-token': 'user:tenant:spl_role', 'x-image-meta-property-spl_update_prop': '1', 'X-Glance-Registry-Purge-Props': 'False'}
    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('1', res_body['properties']['spl_update_prop'])
    self.assertNotIn('foo', res_body['properties'])
