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

TMSS-1144: added sap as parameter

parent 77da098c
No related branches found
No related tags found
1 merge request!635Resolve TMSS-1144
...@@ -425,7 +425,8 @@ def Dataproduct_test_data(producer: models.SubtaskOutput=None, ...@@ -425,7 +425,8 @@ def Dataproduct_test_data(producer: models.SubtaskOutput=None,
specifications_doc: object=None, specifications_doc: object=None,
specifications_template: models.DataproductSpecificationsTemplate=None, specifications_template: models.DataproductSpecificationsTemplate=None,
feedback_doc: object = None, feedback_doc: object = None,
feedback_template: models.DataproductFeedbackTemplate = None) -> dict: feedback_template: models.DataproductFeedbackTemplate = None,
sap: models.SAP = None) -> dict:
if filename is None: if filename is None:
filename = "my_file_%s.ext" % uuid.uuid4() filename = "my_file_%s.ext" % uuid.uuid4()
...@@ -454,6 +455,9 @@ def Dataproduct_test_data(producer: models.SubtaskOutput=None, ...@@ -454,6 +455,9 @@ def Dataproduct_test_data(producer: models.SubtaskOutput=None,
if feedback_doc is None: if feedback_doc is None:
feedback_doc = get_default_json_object_for_schema(feedback_template.schema) feedback_doc = get_default_json_object_for_schema(feedback_template.schema)
if sap is None:
sap = models.SAP.objects.create(**SAP_test_data())
return {"filename": filename, return {"filename": filename,
"directory": directory, "directory": directory,
"dataformat": dataformat, "dataformat": dataformat,
...@@ -467,7 +471,7 @@ def Dataproduct_test_data(producer: models.SubtaskOutput=None, ...@@ -467,7 +471,7 @@ def Dataproduct_test_data(producer: models.SubtaskOutput=None,
"size": 123, "size": 123,
"feedback_doc": feedback_doc, "feedback_doc": feedback_doc,
"feedback_template": feedback_template, "feedback_template": feedback_template,
"sap": models.SAP.objects.create(**SAP_test_data()), "sap": sap,
"global_identifier": models.SIPidentifier.objects.create(source="TMSS")} "global_identifier": models.SIPidentifier.objects.create(source="TMSS")}
def AntennaSet_test_data() -> dict: def AntennaSet_test_data() -> 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