'Tests that the registry API updates the image'

def test_image_update_conflict(self):

    next_state = 'saving'
    fixture = {'name': 'fake    public    image    #2', 'disk_format': 'vmdk', 'status': next_state}
    image = self.client.image_get(image_id=UUID2)
    current = image['status']
    self.assertEqual('active', current)
    from_state = 'saving'
    self.assertRaises(exception.Conflict, self.client.image_update, image_id=UUID2, values=fixture, from_state=from_state)
    try:
        self.client.image_update(image_id=UUID2, values=fixture, from_state=from_state)
    except exception.Conflict as exc:
        msg = (_('cannot    transition    from    %(current)s    to    %(next)s    in    update    (wanted    from_state=%(from)s)') % {'current': current, 'next': next_state, 'from': from_state})
        self.assertEqual(str(exc), msg)
