'Tests that registry API endpoint returns the expected image.'

def test_show(self):

    fixture = {'id': UUID2, 'name': 'fake    image    #2', 'size': 19, 'min_ram': 256, 'min_disk': 5, 'checksum': None}
    req = webob.Request.blank('/rpc')
    req.method = 'POST'
    cmd = [{'command': 'image_get', 'kwargs': {'image_id': UUID2}}]
    req.body = jsonutils.dump_as_bytes(cmd)
    res = req.get_response(self.api)
    self.assertEqual(http.OK, res.status_int)
    res_dict = jsonutils.loads(res.body)[0]
    image = res_dict
    for (k, v) in six.iteritems(fixture):
        self.assertEqual(v, image[k])
