'Finish an instance action event with an error.'

def test_instance_action_event_finish_error(self):

    uuid = uuidsentinel.uuid1
    action = db.action_start(self.ctxt, self._create_action_values(uuid))
    db.action_event_start(self.ctxt, self._create_event_values(uuid))
    event_values = {'finish_time': (timeutils.utcnow() + datetime.timedelta(seconds=5)), 'result': 'Error'}
    event_values = self._create_event_values(uuid, extra=event_values)
    event = db.action_event_finish(self.ctxt, event_values)
    self._assertActionEventSaved(event, action['id'])
    action = db.action_get_by_request_id(self.ctxt, uuid, self.ctxt.request_id)
    self.assertEqual('Error', action['message'])
