def _create_random_asmt_tmpl(cls):
     """Create Assessment Template entity with randomly and predictably
 filled fields.
 """
     random_asmt_tmpl = entity.AssessmentTemplateEntity()
     random_asmt_tmpl.title = cls.generate_title(cls.obj_asmt_tmpl)
     random_asmt_tmpl.type = cls.obj_asmt_tmpl
     random_asmt_tmpl.code = cls.generate_code()
     random_asmt_tmpl.asmt_objects = objects.CONTROLS
     random_asmt_tmpl.def_assessors = roles.OBJECT_OWNERS
     random_asmt_tmpl.def_verifiers = roles.OBJECT_OWNERS
     return random_asmt_tmpl
Example #2
0
 def _create_random_asmt_tmpl(cls):
     """Create Assessment Template entity with randomly and predictably
 filled fields.
 """
     random_asmt_tmpl = entity.AssessmentTemplateEntity()
     random_asmt_tmpl.type = cls.obj_asmt_tmpl
     random_asmt_tmpl.title = cls.generate_string(cls.obj_asmt_tmpl)
     random_asmt_tmpl.slug = cls.generate_slug()
     random_asmt_tmpl.template_object_type = cls.obj_control.title()
     random_asmt_tmpl.default_people = {
         "verifiers": roles.AUDITORS,
         "assessors": roles.AUDIT_LEAD
     }
     return random_asmt_tmpl
Example #3
0
 def create_empty(cls):
     """Create blank Assessment Template object."""
     empty_asmt_tmpl = entity.AssessmentTemplateEntity()
     empty_asmt_tmpl.type = cls.obj_asmt_tmpl
     return empty_asmt_tmpl