Skip to content
Snippets Groups Projects
Commit 5f6a0c9e authored by Jörn Künsemöller's avatar Jörn Künsemöller
Browse files

TMSS-313: fix tests

parent 074381c9
No related branches found
No related tags found
1 merge request!207Resolve TMSS-313
......@@ -546,6 +546,7 @@ def schedule_qafile_subtask(qafile_subtask: Subtask):
qafile_subtask_dataproduct = Dataproduct.objects.create(filename="L%s_QA.h5" % (qa_input.producer.subtask_id, ),
directory="/data/qa/qa_files",
dataformat=Dataformat.objects.get(value=Dataformat.Choices.QA_HDF5.value),
datatype=Datatype.objects.get(value=Datatype.Choices.QUALITY.value), # todo: is this correct?
producer=qafile_subtask.outputs.first(),
specifications_doc="",
specifications_template=DataproductSpecificationsTemplate.objects.first(), # ?????
......@@ -596,6 +597,7 @@ def schedule_qaplots_subtask(qaplots_subtask: Subtask):
obs_subtask = qafile_subtask.predecessors.first()
qaplots_subtask_dataproduct = Dataproduct.objects.create(directory="/data/qa/plots/L%s" % (obs_subtask.id, ),
dataformat=Dataformat.objects.get(value=Dataformat.Choices.QA_PLOTS.value),
datatype=Datatype.objects.get(value=Datatype.Choices.QUALITY.value), # todo: is this correct?
producer=qaplots_subtask.outputs.first(),
specifications_doc="",
specifications_template=DataproductSpecificationsTemplate.objects.first(), # ?????
......@@ -796,6 +798,7 @@ def schedule_pipeline_subtask(pipeline_subtask: Subtask):
output_dp = Dataproduct.objects.create(filename=filename,
directory=input_dp.directory.replace(str(pipeline_subtask_input.producer.subtask.pk), str(pipeline_subtask.pk)),
dataformat=Dataformat.objects.get(value="MeasurementSet"),
datatype=Datatype.objects.get(value="visibilities"), # todo: is this correct?
producer=pipeline_subtask_output,
specifications_doc={},
specifications_template=dataproduct_specifications_template,
......
......@@ -480,7 +480,7 @@ class TMSSRESTTestDataCreator():
return {"subtask": subtask_url,
"tags": []}
def Dataproduct(self, filename="my_filename", directory="/tmp/", specifications_template_url=None, subtask_output_url=None, dataproduct_feedback_template_url=None, dataformat="MeasurementSet"):
def Dataproduct(self, filename="my_filename", directory="/tmp/", specifications_template_url=None, subtask_output_url=None, dataproduct_feedback_template_url=None, dataformat="MeasurementSet", datatype="visibilities"):
if specifications_template_url is None:
specifications_template_url = self.post_data_and_get_url(self.SubtaskTemplate(), '/dataproduct_specifications_template/')
......@@ -493,6 +493,7 @@ class TMSSRESTTestDataCreator():
return {"filename": filename,
"directory": directory,
"dataformat": "%s/dataformat/%s" % (self.django_api_url, dataformat),
"datatype": "%s/datatype/%s" % (self.django_api_url, datatype),
"deleted_since": None,
"pinned_since": None,
"specifications_doc": "{}",
......
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