From 397bc53ca33ce3b4e7e8f2835cf61426d2dee2ac Mon Sep 17 00:00:00 2001 From: Jorrit Schaap <schaap@astron.nl> Date: Mon, 12 Oct 2020 16:46:07 +0200 Subject: [PATCH] TMSS-190: create more units. encode prio in name for demo --- SAS/TMSS/src/tmss/tmssapp/populate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SAS/TMSS/src/tmss/tmssapp/populate.py b/SAS/TMSS/src/tmss/tmssapp/populate.py index 9d19d0c7746..57aa13fa3a8 100644 --- a/SAS/TMSS/src/tmss/tmssapp/populate.py +++ b/SAS/TMSS/src/tmss/tmssapp/populate.py @@ -74,13 +74,13 @@ def populate_test_data(): logger.info('created test scheduling_set: %s', scheduling_set.name) - for unit_nr in range(2 if 'normal' in project_prio_name else 1): + for unit_nr in range(3 if 'normal' in project_prio_name else 2): # the 'template' in the strategy_template is a predefined json-data blob which validates against the given scheduling_unit_template # a user might 'upload' a partial json-data blob, so add all the known defaults scheduling_unit_spec = add_defaults_to_json_object_for_schema(strategy_template.template, strategy_template.scheduling_unit_template.schema) # add the scheduling_unit_doc to a new SchedulingUnitDraft instance, and were ready to use it! - scheduling_unit_draft = models.SchedulingUnitDraft.objects.create(name="UC1 test scheduling unit %s.%s" % (set_nr+1, unit_nr+1), + scheduling_unit_draft = models.SchedulingUnitDraft.objects.create(name="UC1 p_%s.%s.%s" % (project_prio_name, set_nr+1, unit_nr+1), scheduling_set=scheduling_set, requirements_template=strategy_template.scheduling_unit_template, requirements_doc=scheduling_unit_spec, -- GitLab