def test_mark_action_instance_complete(self): action_instance = ActionInstance() InstanceWorkflowEngine._mark_action_instance_complete( action_instance, StatusConstants.SUCCESS) eq_(StatusConstants.SUCCESS, action_instance.status_id) ok_(action_instance.end_date is not None)
def test_mark_action_instance_complete_canceled(self): action_instance = ActionInstance(start_date=datetime.datetime.utcnow()) InstanceWorkflowEngine._mark_action_instance_complete( action_instance, StatusConstants.CANCELED) eq_(action_instance.start_date, action_instance.end_date)