diff --git a/SAS/TMSS/test/t_tmssapp_specification_REST_API.py b/SAS/TMSS/test/t_tmssapp_specification_REST_API.py index e69a0a55f0bf1cbd466253a051ec5db88cd42392..fcc924b18f1e279037098202338d05002e107cf1 100755 --- a/SAS/TMSS/test/t_tmssapp_specification_REST_API.py +++ b/SAS/TMSS/test/t_tmssapp_specification_REST_API.py @@ -1562,8 +1562,8 @@ class TaskDraftTestCase(unittest.TestCase): GET_and_assert_equal_expected_code(self, url, 404) def test_task_draft_SET_NULL_behavior_on_copies_deleted(self): - taskdraft_test_data1 = test_data_creator.TaskDraft(name="the one", scheduling_unit_draft_url=self.scheduling_unit_draft_url, template_url=self.template_url) - taskdraft_test_data2 = test_data_creator.TaskDraft(name="the other", scheduling_unit_draft_url=self.scheduling_unit_draft_url, template_url=self.template_url) + taskdraft_test_data1 = test_data_creator.TaskDraft(name="the one "+str(uuid.uuid4()), scheduling_unit_draft_url=self.scheduling_unit_draft_url, template_url=self.template_url) + taskdraft_test_data2 = test_data_creator.TaskDraft(name="the other "+str(uuid.uuid4()), scheduling_unit_draft_url=self.scheduling_unit_draft_url, template_url=self.template_url) # POST new item with dependency copy_url = POST_and_assert_expected_response(self, BASE_URL + '/task_draft/', taskdraft_test_data2, 201, taskdraft_test_data2)['url'] @@ -1667,7 +1667,7 @@ class TaskRelationDraftTestCase(unittest.TestCase): GET_and_assert_equal_expected_code(self, BASE_URL + '/task_relation_draft/1234321/', 404) def test_task_relation_draft_POST_and_GET(self): - trd_test_data = test_data_creator.TaskRelationDraft(producer_url=self.producer_url, consumer_url=self.consumer_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url) + trd_test_data = test_data_creator.TaskRelationDraft(producer_url=self.producer_url, consumer_url=self.consumer_url, template_url=self.template_url, input_role_url=self.input_role_url) # POST and GET a new item and assert correctness r_dict = POST_and_assert_expected_response(self, BASE_URL + '/task_relation_draft/', trd_test_data, 201, trd_test_data) @@ -1675,12 +1675,11 @@ class TaskRelationDraftTestCase(unittest.TestCase): GET_OK_and_assert_equal_expected_response(self, url, trd_test_data) def test_task_relation_draft_PUT_invalid_raises_error(self): - trd_test_data = test_data_creator.TaskRelationDraft(producer_url=self.producer_url, consumer_url=self.consumer_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url) + trd_test_data = test_data_creator.TaskRelationDraft(producer_url=self.producer_url, consumer_url=self.consumer_url, template_url=self.template_url, input_role_url=self.input_role_url) PUT_and_assert_expected_response(self, BASE_URL + '/task_relation_draft/9876789876/', trd_test_data, 404, {}) def test_task_relation_draft_PUT(self): - trd_test_data1 = test_data_creator.TaskRelationDraft(producer_url=self.producer_url, consumer_url=self.consumer_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url) - trd_test_data2 = test_data_creator.TaskRelationDraft(producer_url=self.producer_url, consumer_url=self.consumer_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url) + trd_test_data1 = test_data_creator.TaskRelationDraft(producer_url=self.producer_url, consumer_url=self.consumer_url, template_url=self.template_url, input_role_url=self.input_role_url) # POST new item, verify r_dict = POST_and_assert_expected_response(self, BASE_URL + '/task_relation_draft/', trd_test_data1, 201, trd_test_data1) @@ -1688,11 +1687,12 @@ class TaskRelationDraftTestCase(unittest.TestCase): GET_OK_and_assert_equal_expected_response(self, url, trd_test_data1) # PUT new values, verify + trd_test_data2 = test_data_creator.TaskRelationDraft(producer_url=self.producer_url, consumer_url=test_data_creator.post_data_and_get_url(test_data_creator.TaskDraft(),'/task_draft/'), template_url=self.template_url, input_role_url=self.input_role_url) PUT_and_assert_expected_response(self, url, trd_test_data2, 200, trd_test_data2) GET_OK_and_assert_equal_expected_response(self, url, trd_test_data2) def test_task_relation_draft_PATCH(self): - trd_test_data = test_data_creator.TaskRelationDraft(producer_url=self.producer_url, consumer_url=self.consumer_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url) + trd_test_data = test_data_creator.TaskRelationDraft(producer_url=self.producer_url, consumer_url=self.consumer_url, template_url=self.template_url, input_role_url=self.input_role_url) # POST new item, verify r_dict = POST_and_assert_expected_response(self, BASE_URL + '/task_relation_draft/', trd_test_data, 201, trd_test_data) @@ -1708,7 +1708,7 @@ class TaskRelationDraftTestCase(unittest.TestCase): GET_OK_and_assert_equal_expected_response(self, url, expected_data) def test_task_relation_draft_DELETE(self): - trd_test_data = test_data_creator.TaskRelationDraft(producer_url=self.producer_url, consumer_url=self.consumer_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url) + trd_test_data = test_data_creator.TaskRelationDraft(producer_url=self.producer_url, consumer_url=self.consumer_url, template_url=self.template_url, input_role_url=self.input_role_url) # POST new item, verify r_dict = POST_and_assert_expected_response(self, BASE_URL + '/task_relation_draft/', trd_test_data, 201, trd_test_data) @@ -1720,7 +1720,7 @@ class TaskRelationDraftTestCase(unittest.TestCase): def test_task_relation_draft_CASCADE_behavior_on_task_relation_selection_template_deleted(self): template_url = test_data_creator.post_data_and_get_url(test_data_creator.TaskRelationSelectionTemplate(), '/task_relation_selection_template/') - trd_test_data = test_data_creator.TaskRelationDraft(template_url=template_url, producer_url=self.producer_url, consumer_url=self.consumer_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url) + trd_test_data = test_data_creator.TaskRelationDraft(template_url=template_url, producer_url=self.producer_url, consumer_url=self.consumer_url, input_role_url=self.input_role_url) # POST new item url = POST_and_assert_expected_response(self, BASE_URL + '/task_relation_draft/', trd_test_data, 201, trd_test_data)['url'] @@ -1736,7 +1736,7 @@ class TaskRelationDraftTestCase(unittest.TestCase): def test_task_relation_draft_CASCADE_behavior_on_producer_deleted(self): producer_url = test_data_creator.post_data_and_get_url(test_data_creator.TaskDraft(), '/task_draft/') - trd_test_data = test_data_creator.TaskRelationDraft(producer_url=producer_url, consumer_url=self.consumer_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url) + trd_test_data = test_data_creator.TaskRelationDraft(producer_url=producer_url, consumer_url=self.consumer_url, template_url=self.template_url, input_role_url=self.input_role_url) # POST new item url = POST_and_assert_expected_response(self, BASE_URL + '/task_relation_draft/', @@ -1753,7 +1753,7 @@ class TaskRelationDraftTestCase(unittest.TestCase): def test_task_relation_draft_CASCADE_behavior_on_consumer_deleted(self): consumer_url = test_data_creator.post_data_and_get_url(test_data_creator.TaskDraft(), '/task_draft/') - trd_test_data = test_data_creator.TaskRelationDraft(consumer_url=consumer_url, producer_url=self.producer_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url) + trd_test_data = test_data_creator.TaskRelationDraft(consumer_url=consumer_url, producer_url=self.producer_url, template_url=self.template_url, input_role_url=self.input_role_url) # POST new item with dependency url = POST_and_assert_expected_response(self, BASE_URL + '/task_relation_draft/', @@ -1770,7 +1770,7 @@ class TaskRelationDraftTestCase(unittest.TestCase): def test_task_relation_draft_CASCADE_behavior_on_input_deleted(self): input_url = test_data_creator.post_data_and_get_url(test_data_creator.TaskConnectorType(), '/task_connector_type/') - trd_test_data = test_data_creator.TaskRelationDraft(input_role_url=input_url, producer_url=self.producer_url, consumer_url=self.consumer_url, template_url=self.template_url, output_role_url=self.output_role_url) + trd_test_data = test_data_creator.TaskRelationDraft(input_role_url=input_url, producer_url=self.producer_url, consumer_url=self.consumer_url, template_url=self.template_url) # POST new item url = POST_and_assert_expected_response(self, BASE_URL + '/task_relation_draft/', @@ -1861,8 +1861,8 @@ class SchedulingUnitBlueprintTestCase(unittest.TestCase): PUT_and_assert_expected_response(self, BASE_URL + '/scheduling_unit_blueprint/9876789876/', sub_test_data, 404, {}) def test_scheduling_unit_blueprint_PUT(self): - sub_test_data1 = test_data_creator.SchedulingUnitBlueprint(name="the one", scheduling_unit_draft_url=self.scheduling_unit_draft_url, template_url=self.template_url) - sub_test_data2 = test_data_creator.SchedulingUnitBlueprint(name="the other", scheduling_unit_draft_url=self.scheduling_unit_draft_url, template_url=self.template_url) + sub_test_data1 = test_data_creator.SchedulingUnitBlueprint(name="the one "+str(uuid.uuid4()), scheduling_unit_draft_url=self.scheduling_unit_draft_url, template_url=self.template_url) + sub_test_data2 = test_data_creator.SchedulingUnitBlueprint(name="the other "+str(uuid.uuid4()), scheduling_unit_draft_url=self.scheduling_unit_draft_url, template_url=self.template_url) # POST new item, verify r_dict = POST_and_assert_expected_response(self, BASE_URL + '/scheduling_unit_blueprint/', sub_test_data1, 201, sub_test_data1) @@ -1974,8 +1974,8 @@ class TaskBlueprintTestCase(unittest.TestCase): PUT_and_assert_expected_response(self, BASE_URL + '/task_blueprint/9876789876/', tb_test_data, 404, {}) def test_task_blueprint_PUT(self): - tb_test_data1 = test_data_creator.TaskBlueprint(name="the one", draft_url=self.draft_url, template_url=self.template_url, scheduling_unit_blueprint_url=self.scheduling_unit_blueprint_url) - tb_test_data2 = test_data_creator.TaskBlueprint(name="the other", draft_url=self.draft_url, template_url=self.template_url, scheduling_unit_blueprint_url=self.scheduling_unit_blueprint_url) + tb_test_data1 = test_data_creator.TaskBlueprint(name="the one "+str(uuid.uuid4()), draft_url=self.draft_url, template_url=self.template_url, scheduling_unit_blueprint_url=self.scheduling_unit_blueprint_url) + tb_test_data2 = test_data_creator.TaskBlueprint(name="the other "+str(uuid.uuid4()), draft_url=self.draft_url, template_url=self.template_url, scheduling_unit_blueprint_url=self.scheduling_unit_blueprint_url) # POST new item, verify r_dict = POST_and_assert_expected_response(self, BASE_URL + '/task_blueprint/', tb_test_data1, 201, tb_test_data1) @@ -2183,7 +2183,7 @@ class TaskRelationBlueprintTestCase(unittest.TestCase): GET_and_assert_equal_expected_code(self, BASE_URL + '/task_relation_blueprint/1234321/', 404) def test_task_relation_blueprint_POST_and_GET(self): - trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) + trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) # POST and GET a new item and assert correctness r_dict = POST_and_assert_expected_response(self, BASE_URL + '/task_relation_blueprint/', trb_test_data, 201, trb_test_data) @@ -2191,12 +2191,11 @@ class TaskRelationBlueprintTestCase(unittest.TestCase): GET_OK_and_assert_equal_expected_response(self, url, trb_test_data) def test_task_relation_blueprint_PUT_invalid_raises_error(self): - trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) + trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) PUT_and_assert_expected_response(self, BASE_URL + '/task_relation_blueprint/9876789876/', trb_test_data, 404, {}) def test_task_relation_blueprint_PUT(self): - trb_test_data1 = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) - trb_test_data2 = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) + trb_test_data1 = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) # POST new item, verify r_dict = POST_and_assert_expected_response(self, BASE_URL + '/task_relation_blueprint/', trb_test_data1, 201, trb_test_data1) @@ -2204,11 +2203,12 @@ class TaskRelationBlueprintTestCase(unittest.TestCase): GET_OK_and_assert_equal_expected_response(self, url, trb_test_data1) # PUT new values, verify + trb_test_data2 = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, consumer_url=test_data_creator.post_data_and_get_url(test_data_creator.TaskBlueprint(),'/task_blueprint/'), producer_url=self.producer_url) PUT_and_assert_expected_response(self, url, trb_test_data2, 200, trb_test_data2) GET_OK_and_assert_equal_expected_response(self, url, trb_test_data2) def test_task_relation_blueprint_PATCH(self): - trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) + trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) # POST new item, verify r_dict = POST_and_assert_expected_response(self, BASE_URL + '/task_relation_blueprint/', trb_test_data, 201, trb_test_data) @@ -2224,7 +2224,7 @@ class TaskRelationBlueprintTestCase(unittest.TestCase): GET_OK_and_assert_equal_expected_response(self, url, expected_data) def test_task_relation_blueprint_DELETE(self): - trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) + trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) # POST new item, verify r_dict = POST_and_assert_expected_response(self, BASE_URL + '/task_relation_blueprint/', trb_test_data, 201, trb_test_data) @@ -2235,7 +2235,7 @@ class TaskRelationBlueprintTestCase(unittest.TestCase): DELETE_and_assert_gone(self, url) def test_task_relation_blueprint_prevents_missing_selection_template(self): - trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) + trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) # test data test_data = dict(trb_test_data) @@ -2246,7 +2246,7 @@ class TaskRelationBlueprintTestCase(unittest.TestCase): self.assertTrue('This field may not be null' in str(r_dict['selection_template'])) def test_task_relation_blueprint_prevents_missing_draft(self): - trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) + trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) # test data test_data = dict(trb_test_data) @@ -2257,7 +2257,7 @@ class TaskRelationBlueprintTestCase(unittest.TestCase): self.assertTrue('This field may not be null' in str(r_dict['draft'])) def test_task_relation_blueprint_prevents_missing_producer(self): - trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) + trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) # test data test_data = dict(trb_test_data) @@ -2268,7 +2268,7 @@ class TaskRelationBlueprintTestCase(unittest.TestCase): self.assertTrue('This field may not be null' in str(r_dict['producer'])) def test_task_relation_blueprint_prevents_missing_consumer(self): - trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) + trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) # test data test_data = dict(trb_test_data) @@ -2279,7 +2279,7 @@ class TaskRelationBlueprintTestCase(unittest.TestCase): self.assertTrue('This field may not be null' in str(r_dict['consumer'])) def test_task_relation_blueprint_prevents_missing_input(self): - trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) + trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) # test data test_data = dict(trb_test_data) @@ -2290,7 +2290,7 @@ class TaskRelationBlueprintTestCase(unittest.TestCase): self.assertTrue('This field may not be null' in str(r_dict['input_role'])) def test_task_relation_blueprint_prevents_missing_output(self): - trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) + trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) # test data test_data = dict(trb_test_data) @@ -2302,7 +2302,7 @@ class TaskRelationBlueprintTestCase(unittest.TestCase): def test_task_relation_blueprint_CASCADE_behavior_on_task_relation_selection_template_deleted(self): template_url = test_data_creator.post_data_and_get_url(test_data_creator.TaskRelationSelectionTemplate(), '/task_relation_selection_template/') - trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) + trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=template_url, input_role_url=self.input_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) # POST new item url = POST_and_assert_expected_response(self, BASE_URL + '/task_relation_blueprint/', trb_test_data, 201, trb_test_data)['url'] @@ -2318,7 +2318,7 @@ class TaskRelationBlueprintTestCase(unittest.TestCase): def test_task_relation_blueprint_CASCADE_behavior_on_producer_deleted(self): producer_url = test_data_creator.post_data_and_get_url(test_data_creator.TaskBlueprint(), '/task_blueprint/') - trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url, consumer_url=self.consumer_url, producer_url=producer_url) + trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, consumer_url=self.consumer_url, producer_url=producer_url) # POST new item url = POST_and_assert_expected_response(self, BASE_URL + '/task_relation_blueprint/', @@ -2335,7 +2335,7 @@ class TaskRelationBlueprintTestCase(unittest.TestCase): def test_task_relation_blueprint_CASCADE_behavior_on_consumer_deleted(self): consumer_url = test_data_creator.post_data_and_get_url(test_data_creator.TaskBlueprint(), '/task_blueprint/') - trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, output_role_url=self.output_role_url, consumer_url=consumer_url, producer_url=self.producer_url) + trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=self.input_role_url, consumer_url=consumer_url, producer_url=self.producer_url) # POST new item with dependency url = POST_and_assert_expected_response(self, BASE_URL + '/task_relation_blueprint/', @@ -2352,7 +2352,7 @@ class TaskRelationBlueprintTestCase(unittest.TestCase): def test_task_relation_blueprint_CASCADE_behavior_on_input_deleted(self): input_url = test_data_creator.post_data_and_get_url(test_data_creator.TaskConnectorType(), '/task_connector_type/') - trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=input_url, output_role_url=self.output_role_url, consumer_url=self.consumer_url, producer_url=self.producer_url) + trb_test_data = test_data_creator.TaskRelationBlueprint(draft_url=self.draft_url, template_url=self.template_url, input_role_url=input_url, consumer_url=self.consumer_url, producer_url=self.producer_url) # POST new item url = POST_and_assert_expected_response(self, BASE_URL + '/task_relation_blueprint/', diff --git a/SAS/TMSS/test/tmss_test_data_rest.py b/SAS/TMSS/test/tmss_test_data_rest.py index 17f78eaf04f89360724f2c1896037f65c2029445..b1f538bbe9111870b91ed970ff2f4332744c17d1 100644 --- a/SAS/TMSS/test/tmss_test_data_rest.py +++ b/SAS/TMSS/test/tmss_test_data_rest.py @@ -287,7 +287,10 @@ class TMSSRESTTestDataCreator(): "scheduling_unit_blueprints": [], "task_drafts": []} - def TaskDraft(self, name='my_task_draft', scheduling_unit_draft_url=None, template_url=None, specifications_doc=None): + def TaskDraft(self, name=None, scheduling_unit_draft_url=None, template_url=None, specifications_doc=None): + if name is None: + name = str(uuid.uuid4()) + if scheduling_unit_draft_url is None: scheduling_unit_draft_url = self.post_data_and_get_url(self.SchedulingUnitDraft(), '/scheduling_unit_draft/') @@ -365,7 +368,10 @@ class TMSSRESTTestDataCreator(): "requirements_template": template_url, "task_blueprints": []} - def TaskBlueprint(self, name="my_TaskBlueprint", draft_url=None, template_url=None, scheduling_unit_blueprint_url=None, specifications_doc=None): + def TaskBlueprint(self, name=None, draft_url=None, template_url=None, scheduling_unit_blueprint_url=None, specifications_doc=None): + if name is None: + name = str(uuid.uuid4()) + if draft_url is None: task_draft = self.TaskDraft() draft_url = self.post_data_and_get_url(task_draft, '/task_draft/')