'Ensure that updating image properties enforces the quota.'

def test_update_image_with_too_many_properties(self):

    self.config(image_property_quota=1)
    image_id = self._create_admin_image()
    another_request = unit_test_utils.get_fake_request(path=('/images/%s' % image_id), method='PUT')
    headers = {'x-auth-token': 'user:tenant:joe_soap', 'x-image-meta-property-x_all_permitted': '1', 'x-image-meta-property-x_all_permitted_foo': '2'}
    for (k, v) in six.iteritems(headers):
        another_request.headers[k] = v
    output = another_request.get_response(self.api)
    self.assertEqual(http_client.REQUEST_ENTITY_TOO_LARGE, output.status_int)
    self.assertIn('Attempted:    2,    Maximum:    1', output.text)
