From 1cec47cf5a11313147231b787a1c7fe2d5aef15f Mon Sep 17 00:00:00 2001 From: jkuensem <jkuensem@physik.uni-bielefeld.de> Date: Wed, 2 Dec 2020 18:07:37 +0100 Subject: [PATCH] TMSS-250: add endpoint for target rise and set, and add sky constraint logic that uses it --- .../services/scheduling/test/t_dynamic_scheduling.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/SAS/TMSS/services/scheduling/test/t_dynamic_scheduling.py b/SAS/TMSS/services/scheduling/test/t_dynamic_scheduling.py index cf1188b0472..8146359b38d 100755 --- a/SAS/TMSS/services/scheduling/test/t_dynamic_scheduling.py +++ b/SAS/TMSS/services/scheduling/test/t_dynamic_scheduling.py @@ -424,9 +424,7 @@ class TestDailyConstraints(TestCase): def test_can_run_within_timewindow_with_daytime_constraint_returns_correct_value(self): # todo: for time ranges across dates, consider removing the mock for this because the moving window cannot be easily mocked # remove other constraints: - self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_distance'] = {} - self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_target_elevation'] = {} - self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_calibrator_elevation'] = {} + self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky'] = {} # set constraint to test self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['daily']['require_day'] = True @@ -560,9 +558,7 @@ class TestDailyConstraints(TestCase): def test_can_run_within_timewindow_with_nighttime_constraint_returns_correct_value(self): # todo: for time ranges across dates, consider removing the mock for this because the moving window cannot be easily mocked # remove other constraints: - self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_distance'] = {} - self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_target_elevation'] = {} - self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_calibrator_elevation'] = {} + self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky'] = {} # set constraint to test self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['daily']['require_night'] = True @@ -694,9 +690,7 @@ class TestDailyConstraints(TestCase): def test_can_run_within_timewindow_with_twilight_constraint_returns_correct_value(self): # todo: for time ranges across dates, consider removing the mock for this because the moving window cannot be easily mocked # remove other constraints: - self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_distance'] = {} - self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_target_elevation'] = {} - self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky']['min_calibrator_elevation'] = {} + self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['sky'] = {} # set constraint to test self.scheduling_unit_blueprint.draft.scheduling_constraints_doc['daily']['avoid_twilight'] = True -- GitLab