Skip to content
Snippets Groups Projects
Commit 200e8f0c authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-190: added specifications_template argument

parent d7df49df
No related branches found
No related tags found
1 merge request!252Resolve TMSS-190
...@@ -237,20 +237,26 @@ def SchedulingUnitBlueprint_test_data(name='my_scheduling_unit_blueprint', requi ...@@ -237,20 +237,26 @@ def SchedulingUnitBlueprint_test_data(name='my_scheduling_unit_blueprint', requi
"do_cancel": False, "do_cancel": False,
"draft": models.SchedulingUnitDraft.objects.create(**SchedulingUnitDraft_test_data()) } "draft": models.SchedulingUnitDraft.objects.create(**SchedulingUnitDraft_test_data()) }
def TaskBlueprint_test_data(name='my_task_blueprint', task_draft: models.TaskDraft = None, scheduling_unit_blueprint: models.SchedulingUnitBlueprint = None) -> dict: def TaskBlueprint_test_data(name='my_task_blueprint', task_draft: models.TaskDraft = None, scheduling_unit_blueprint: models.SchedulingUnitBlueprint = None, specifications_template: models.TaskTemplate=None, specifications_doc: dict=None) -> dict:
if task_draft is None: if task_draft is None:
task_draft = models.TaskDraft.objects.create(**TaskDraft_test_data()) task_draft = models.TaskDraft.objects.create(**TaskDraft_test_data())
if specifications_template is None:
specifications_template = task_draft.specifications_template
if specifications_doc is None:
specifications_doc = get_default_json_object_for_schema(specifications_template.schema)
if scheduling_unit_blueprint is None: if scheduling_unit_blueprint is None:
scheduling_unit_blueprint = models.SchedulingUnitBlueprint.objects.create(**SchedulingUnitBlueprint_test_data()) scheduling_unit_blueprint = models.SchedulingUnitBlueprint.objects.create(**SchedulingUnitBlueprint_test_data())
return {"name": name, return {"name": name,
"description": "", "description": "",
"tags": [], "tags": [],
"specifications_doc": task_draft.specifications_doc, "specifications_doc": specifications_doc,
"do_cancel": False, "do_cancel": False,
"draft": task_draft, "draft": task_draft,
"specifications_template": task_draft.specifications_template, "specifications_template": specifications_template,
"scheduling_unit_blueprint": scheduling_unit_blueprint} "scheduling_unit_blueprint": scheduling_unit_blueprint}
def TaskRelationBlueprint_test_data(producer: models.TaskBlueprint = None, consumer: models.TaskBlueprint = None) -> dict: def TaskRelationBlueprint_test_data(producer: models.TaskBlueprint = None, consumer: models.TaskBlueprint = None) -> dict:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment