def test_mark_job_complete_changes_running_to_finished(self):
    subject = MockTask(state=task.JobState.RUNNING, node_id='test', job_id=5)
    self.assertFalse(subject.is_unstarted)
    self.assertTrue(subject.is_running)
    subject.mark_job_complete()
    self.assertFalse(subject.is_running)
    self.assertTrue(subject.is_finished)
    self.assertIsNone(subject.node_id)
    self.assertIsNone(subject.job_id)
def test_mark_job_complete_changes_running_to_finished(self):
    subject = MockTask(state=task.JobState.RUNNING, node_id='test', job_id=5)
    self.assertFalse(subject.is_unstarted)
    self.assertTrue(subject.is_running)
    subject.mark_job_complete()
    self.assertFalse(subject.is_running)
    self.assertTrue(subject.is_finished)
    self.assertIsNone(subject.node_id)
    self.assertIsNone(subject.job_id)