

@mock.patch.object(glance.api, 'glance')
def test_image_edit_metadata(self, gc):
    request = self.mock_rest_request(body='{"updated": {"a": "1", "b": "2"}, "removed": ["c", "d"]}')
    response = glance.ImageProperties().patch(request, '1')
    self.assertStatusCode(response, 204)
    self.assertEqual(response.content, b'')
    gc.image_update_properties.assert_called_once_with(request, '1', ['c', 'd'], a='1', b='2')

dataset/ETHPy150Open openstack/horizon/openstack_dashboard/test/api_tests/glance_rest_tests.py ImagesRestTestCase.test_image_edit_metadata/original