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

TMSS-152: added test parameter specifications_doc

parent 9a4d89bc
No related branches found
No related tags found
1 merge request!180Resolve TMSS-152
......@@ -165,17 +165,20 @@ def SchedulingUnitDraft_test_data(name="my_scheduling_unit_draft", scheduling_se
"scheduling_set": scheduling_set,
"requirements_template": template }
def TaskDraft_test_data(name: str="my_task_draft", specifications_template: models.TaskTemplate=None, scheduling_unit_draft: models.SchedulingUnitDraft=None) -> dict:
def TaskDraft_test_data(name: str="my_task_draft", specifications_template: models.TaskTemplate=None, specifications_doc: dict=None, scheduling_unit_draft: models.SchedulingUnitDraft=None) -> dict:
if specifications_template is None:
specifications_template = models.TaskTemplate.objects.create(**TaskTemplate_test_data())
if specifications_doc is None:
specifications_doc = get_default_json_object_for_schema(specifications_template.schema)
if scheduling_unit_draft is None:
scheduling_unit_draft = models.SchedulingUnitDraft.objects.create(**SchedulingUnitDraft_test_data())
return {"name": name,
"description": "",
"tags": [],
"specifications_doc": get_default_json_object_for_schema(specifications_template.schema),
"specifications_doc": specifications_doc,
"copy_reason": models.CopyReason.objects.get(value='template'),
"copies": None,
"scheduling_unit_draft": scheduling_unit_draft,
......
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