Skip to content
Snippets Groups Projects
Commit cd95c58e authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #10695: Updated (type,subtype) tuples for maintenance and reservation to...

Task #10695: Updated (type,subtype) tuples for maintenance and reservation to become (reservation,maintenance) and (reservation,project)
parent e729a8bf
No related branches found
No related tags found
No related merge requests found
......@@ -54,8 +54,8 @@ class RATaskSpecified(OTDBBusListener):
("Pipeline", "Imaging Pipeline MSSS"): ("pipeline", "imaging pipeline msss"),
("Pipeline", "Long Baseline Pipeline"): ("pipeline", "long baseline pipeline"),
("Pipeline", "Pulsar Pipeline"): ("pipeline", "pulsar pipeline"),
("MAINTENANCE", ""): ("maintenance", ""),
("RESERVATION", ""): ("reservation", ""),
("MAINTENANCE", ""): ("reservation", "maintenance"),
("RESERVATION", ""): ("reservation", "project"),
}
def __init__(self,
......
......@@ -72,10 +72,10 @@ class TestRASubset(unittest.TestCase):
""" Verify that get_specification properly generates an RA parset subset for a preprocessing pipeline parset """
# Arrange
input_parset_file = os.path.join(self.data_sets_dir, "tRATaskSpecified.in_preprocessing")
input_parset = parameterset(input_parset_file)
input_parset = parameterset(input_parset_file)
# Act
result = RATaskSpecified.get_specification(input_parset)
result = RATaskSpecified.get_specification(input_parset)
# Assert
self.assertEqual(result['task_type'], 'pipeline')
......@@ -99,10 +99,10 @@ class TestRASubset(unittest.TestCase):
""" Verify that get_specification properly generates an RA parset subset for a beam observation parset """
# Arrange
input_parset_file = os.path.join(self.data_sets_dir, "tRATaskSpecified.in_beam_observation")
input_parset = parameterset(input_parset_file)
input_parset = parameterset(input_parset_file)
# Act
result = RATaskSpecified.get_specification(input_parset)
result = RATaskSpecified.get_specification(input_parset)
# Assert
self.assertEqual(result['task_type'], 'observation')
......@@ -152,10 +152,10 @@ class TestRASubset(unittest.TestCase):
""" Verify that get_specification properly generates an RA parset subset for a calibration pipeline parset """
# Arrange
input_parset_file = os.path.join(self.data_sets_dir, "tRATaskSpecified.in_calibration_pipeline")
input_parset = parameterset(input_parset_file)
input_parset = parameterset(input_parset_file)
# Act
result = RATaskSpecified.get_specification(input_parset)
result = RATaskSpecified.get_specification(input_parset)
# Assert
self.assertEqual(result['task_type'], 'pipeline')
......@@ -179,10 +179,10 @@ class TestRASubset(unittest.TestCase):
""" Verify that get_specification properly generates an RA parset subset for a long-baseline pipeline parset """
# Arrange
input_parset_file = os.path.join(self.data_sets_dir, "tRATaskSpecified.in_long_baseline_pipeline")
input_parset = parameterset(input_parset_file)
input_parset = parameterset(input_parset_file)
# Act
result = RATaskSpecified.get_specification(input_parset)
result = RATaskSpecified.get_specification(input_parset)
# Assert
self.assertEqual(result['task_type'], 'pipeline')
......@@ -201,10 +201,10 @@ class TestRASubset(unittest.TestCase):
""" Verify that get_specification properly generates an RA parset subset for a pulsar pipeline parset """
# Arrange
input_parset_file = os.path.join(self.data_sets_dir, "tRATaskSpecified.in_pulsar_pipeline")
input_parset = parameterset(input_parset_file)
input_parset = parameterset(input_parset_file)
# Act
result = RATaskSpecified.get_specification(input_parset)
result = RATaskSpecified.get_specification(input_parset)
# Assert
self.assertEqual(result['task_type'], 'pipeline')
......@@ -223,10 +223,10 @@ class TestRASubset(unittest.TestCase):
""" Verify that get_specification properly generates an RA parset subset for an interferometer observation parset """
# Arrange
input_parset_file = os.path.join(self.data_sets_dir, "tRATaskSpecified.in_interferometer_observation")
input_parset = parameterset(input_parset_file)
input_parset = parameterset(input_parset_file)
# Act
result = RATaskSpecified.get_specification(input_parset)
result = RATaskSpecified.get_specification(input_parset)
# Assert
self.assertEqual(result['task_type'], 'observation')
......@@ -258,14 +258,14 @@ class TestRASubset(unittest.TestCase):
""" Verify that get_specification properly generates an RA parset subset for a maintenance task """
# Arrange
input_parset_file = os.path.join(self.data_sets_dir, "tRATaskSpecified.in_maintenance")
input_parset = parameterset(input_parset_file)
input_parset = parameterset(input_parset_file)
# Act
result = RATaskSpecified.get_specification(input_parset)
result = RATaskSpecified.get_specification(input_parset)
# Assert
self.assertEqual(result['task_type'], 'maintenance')
self.assertEqual(result['task_subtype'], '')
self.assertEqual(result['task_type'], 'reservation')
self.assertEqual(result['task_subtype'], 'maintenance')
self.assertEqual(result['specification']['Version.number'], 33385)
self.assertEqual(result['specification']['Observation.VirtualInstrument.stationList'], ['CS003'])
......@@ -276,14 +276,14 @@ class TestRASubset(unittest.TestCase):
""" Verify that get_specification properly generates an RA parset subset for a reservation task """
# Arrange
input_parset_file = os.path.join(self.data_sets_dir, "tRATaskSpecified.in_reservation")
input_parset = parameterset(input_parset_file)
input_parset = parameterset(input_parset_file)
# Act
result = RATaskSpecified.get_specification(input_parset)
result = RATaskSpecified.get_specification(input_parset)
# Assert
self.assertEqual(result['task_type'], 'reservation')
self.assertEqual(result['task_subtype'], '')
self.assertEqual(result['task_subtype'], 'project')
self.assertEqual(result['specification']['Version.number'], 33385)
self.assertEqual(result['specification']['Observation.VirtualInstrument.stationList'], ['DE601','FR606','SE607','UK608'])
......
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