'Tests that the registry API updates the image'

def test_update_image(self):

    fixture = {'name': 'fake    public    image    #2', 'min_disk': 5, 'min_ram': 256, 'disk_format': 'raw'}
    req = webob.Request.blank('/rpc')
    req.method = 'POST'
    cmd = [{'command': 'image_update', 'kwargs': {'values': fixture, '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]
    self.assertNotEqual(res_dict['created_at'], res_dict['updated_at'])
    for (k, v) in six.iteritems(fixture):
        self.assertEqual(v, res_dict[k])
