

@mock.patch.object(glance.api, 'glance')
def test_image_get_metadata(self, gc):
    request = self.mock_rest_request()
    gc.image_get.return_value.properties = {
        'a': '1',
        'b': '2',
    }
    response = glance.ImageProperties().get(request, '1')
    self.assertStatusCode(response, 200)
    self.assertEqual(response.json, {
        'a': '1',
        'b': '2',
    })
    gc.image_get.assert_called_once_with(request, '1')

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