diff --git a/SAS/TMSS/backend/test/t_observation_strategies_specification_and_scheduling_test.py b/SAS/TMSS/backend/test/t_observation_strategies_specification_and_scheduling_test.py index 0951b07cb815e8e9ddb0afbe434f6f698f22bef9..eb7f215048e75116dd5476bcb9332b572259c0db 100755 --- a/SAS/TMSS/backend/test/t_observation_strategies_specification_and_scheduling_test.py +++ b/SAS/TMSS/backend/test/t_observation_strategies_specification_and_scheduling_test.py @@ -494,35 +494,18 @@ class TestObservationStrategiesSpecificationAndScheduling(unittest.TestCase): # "mimic" that the cal_obs_subtask finished (including qa subtasks) for subtask in cal_obs_task['subtasks']: set_subtask_state_following_allowed_transitions(subtask['id'], 'finished') - #self.check_statuses(cal_obs_subtask['id'], "finished", "finished", "observed") - # todo: check_statuses does not allow for different statuses of multiple related tasks - # Either fix that, or fix the inconsistent statuses for target and calibrator tasks here. - # 99: ====================================================================== - # 99: FAIL: test_lba_survey (__main__.TestObservationStrategiesSpecificationAndScheduling) - # 99: ---------------------------------------------------------------------- - # 99: Traceback (most recent call last): - # 99: File "t_observation_strategies_specification_and_scheduling_test.py", line 493, in test_lba_survey - # 99: self.check_statuses(cal_obs_subtask['id'], "finished", "finished", "observed") # todo: verify - # 99: File "t_observation_strategies_specification_and_scheduling_test.py", line 77, in check_statuses - # 99: self.assertEqual(expected_task_status, task['status']) - # 99: AssertionError: 'finished' != 'observed' - # 99: - finished - # 99: + observed - # 99: - # - # - # 99: ====================================================================== - # 99: FAIL: test_lba_survey (__main__.TestObservationStrategiesSpecificationAndScheduling) - # 99: ---------------------------------------------------------------------- - # 99: Traceback (most recent call last): - # 99: File "t_observation_strategies_specification_and_scheduling_test.py", line 493, in test_lba_survey - # 99: self.check_statuses(cal_obs_subtask['id'], "finished", "observed", "observed") # todo: verify - # 99: File "t_observation_strategies_specification_and_scheduling_test.py", line 77, in check_statuses - # 99: self.assertEqual(expected_task_status, task['status']) - # 99: AssertionError: 'observed' != 'finished' - # 99: - observed - # 99: + finished - # 99: + + # todo: check_statuses does not allow for different statuses of multiple related tasks, so we cannot do + # self.check_statuses(cal_obs_subtask['id'], "finished", "finished", "observed") + # but have to assert here directly. (Why are the statuses for target and calibrator tasks inconsistent here?) + cal_obs_subtask = self.tmss_client.get_subtask(cal_obs_subtask['id']) + self.assertEqual("finished", cal_obs_subtask['state_value']) + cal_obs_task = self.tmss_client.get_url_as_json_object(cal_obs_task['url']) + self.assertEqual("finished", cal_obs_task['status']) + target_obs_task = self.tmss_client.get_url_as_json_object(target_obs_task['url']) + self.assertEqual("observed", target_obs_task['status']) + schedunit = self.tmss_client.get_url_as_json_object(scheduling_unit_blueprint['url']) + self.assertEqual("observed", schedunit['status']) # ------------------- # check pipelines