def test_mark_stage_instance_complete(self): stage_instance = StageInstance() InstanceWorkflowEngine._mark_stage_instance_complete( stage_instance, StatusConstants.SUCCESS) eq_(StatusConstants.SUCCESS, stage_instance.status_id) ok_(stage_instance.end_date is not None)
def test_mark_stage_instance_complete_canceled(self): stage_instance = StageInstance(start_date=datetime.datetime.utcnow()) InstanceWorkflowEngine._mark_stage_instance_complete( stage_instance, StatusConstants.CANCELED) eq_(stage_instance.start_date, stage_instance.end_date)