diff --git a/SAS/TMSS/backend/test/t_tmssapp_specification_REST_API.py b/SAS/TMSS/backend/test/t_tmssapp_specification_REST_API.py index 4e8cd306fe1cdb9bea57cb9a0c2c6cd0c9ec7391..924785a6c964cb29cafa7e364644f7bd42d05b84 100755 --- a/SAS/TMSS/backend/test/t_tmssapp_specification_REST_API.py +++ b/SAS/TMSS/backend/test/t_tmssapp_specification_REST_API.py @@ -3151,8 +3151,12 @@ class SubmitTriggerTestCase(unittest.TestCase): project = models.Project.objects.create(**Project_test_data(can_trigger=True)) scheduling_set = models.SchedulingSet.objects.create(**SchedulingSet_test_data("scheduling set", project=project)) - for strategy_template in models.SchedulingUnitObservingStrategyTemplate.objects.all(): - with tmss_test_env.create_tmss_client() as client: + with tmss_test_env.create_tmss_client() as client: + for strategy_template in models.SchedulingUnitObservingStrategyTemplate.objects.all(): + if strategy_template.template_doc_complete_with_defaults.get('scheduling_constraints_template', '') != 'constraints': + logger.info("test_submit_trigger_for_all_strategy_templates: skipping template '%s' which has no known scheduling_constraints_template which can be used while dynamic scheduling", strategy_template.name) + continue + logger.info("test_submit_trigger_for_all_strategy_templates: checking template '%s'", strategy_template.name) trigger_doc = client.get_trigger_specification_doc_for_scheduling_unit_observing_strategy_template(strategy_template.name, strategy_template.version) trigger_doc['scheduling_set_id'] = scheduling_set.id