From bdc7223c752d45c11a24e02e132530f4935f50cc Mon Sep 17 00:00:00 2001 From: Mario Raciti <mario.raciti@inaf.it> Date: Wed, 21 Apr 2021 17:08:27 +0200 Subject: [PATCH] TMSS-715: Add test for piggyback parset keys --- SAS/TMSS/backend/test/t_adapter.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SAS/TMSS/backend/test/t_adapter.py b/SAS/TMSS/backend/test/t_adapter.py index 7e6584db476..224f5d4b8a1 100755 --- a/SAS/TMSS/backend/test/t_adapter.py +++ b/SAS/TMSS/backend/test/t_adapter.py @@ -98,6 +98,16 @@ class ObservationParsetAdapterTest(unittest.TestCase): # check whether the ResourceEstimator agrees with our spec self.assertEqual(nr_files, estimations["estimates"][0]["output_files"]["uv"][0]["properties"]["nr_of_uv_files"] * estimations["estimates"][0]["resource_count"]) + def test_piggyback_keys(self): + specifications_doc = self.get_default_specifications() + subtask = self.create_subtask(specifications_doc) + parset = convert_to_parset_dict(subtask) + sub = [tb.scheduling_unit_blueprint for tb in subtask.task_blueprints.all()][0] + + # Assert the values are the same of the scheduling_unit_blueprint + self.assertEqual(sub.piggyback_allowed_aartfaac, parset["ObservationControl.StationControl.aartfaacPiggybackAllowed"]) + self.assertEqual(sub.piggyback_allowed_tbb, parset["ObservationControl.StationControl.tbbPiggybackAllowed"]) + def test_flyseye(self): specifications_doc = self.get_default_specifications() specifications_doc['COBALT']['version'] = 1 -- GitLab