diff --git a/SAS/TMSS/src/tmss/tmssapp/tasks.py b/SAS/TMSS/src/tmss/tmssapp/tasks.py index 9b16ade3ad00ba0e6db5f29e915d96313bb3feea..e42b9aff0b2175055500fab8cd7a6d2e213faf87 100644 --- a/SAS/TMSS/src/tmss/tmssapp/tasks.py +++ b/SAS/TMSS/src/tmss/tmssapp/tasks.py @@ -25,9 +25,12 @@ def create_task_blueprint_from_task_draft_and_instantiate_subtasks_from_template """ logger.debug("create_task_blueprint_from_task_draft_and_instantiate_subtasks_from_template(task_draft.id=%s)...", task_draft.pk) task_blueprint = create_task_blueprint_from_task_draft(task_draft) - obs_subtask = create_subtask_observation_control(task_blueprint) - pipe_subtask = create_subtask_pipeline_control(task_blueprint) + + # HACK: I also create a task blueprint from task draft (pipeline) but that should not be done here.... + task_blueprint_pipeline = create_task_blueprint_from_task_draft(TaskDraft.objects.get(name='Test PreProcessingPipeline Task')) + pipe_subtask = create_subtask_pipeline_control(task_blueprint_pipeline) + connect_observation_subtask_to_preprocessing_subtask(obs_subtask, pipe_subtask) if task_blueprint.specifications_doc.get("QA",{}).get("file_conversion",{}).get("enabled", False): diff --git a/SAS/TMSS/test/t_specify_observation.py b/SAS/TMSS/test/t_specify_observation.py index f80b138af737d0b6d9ef852e24c4342470aeeaa1..2a3c16918870e30f6725e8000e08b45dbcfa57f7 100755 --- a/SAS/TMSS/test/t_specify_observation.py +++ b/SAS/TMSS/test/t_specify_observation.py @@ -54,7 +54,7 @@ class SpecifyObservationFromTaskDraftTest(unittest.TestCase): task_blueprint = create_task_blueprint_from_task_draft_and_instantiate_subtasks_from_template(task_draft) self.assertEqual(task_draft.name, task_blueprint.draft.name) res_task_blueprint = GET_and_assert_equal_expected_code(self, BASE_URL + '/task_blueprint/1/', 200) - self.assertEqual(len(res_task_blueprint['subtasks']), 4) + self.assertEqual(len(res_task_blueprint['subtasks']), 3) self.assertEqual(res_task_blueprint['specifications_template'], res_task_draft['specifications_template']) for subtask_url in res_task_blueprint['subtasks']: res_subtask = GET_and_assert_equal_expected_code(self, subtask_url, 200)