Skip to content
Snippets Groups Projects
Commit 397bc53c authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-190: create more units. encode prio in name for demo

parent 4052d5a8
No related branches found
No related tags found
1 merge request!252Resolve TMSS-190
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment