Ejemplo n.º 1
0
 def _create_random_audit(cls):
     """Create Audit entity with randomly and predictably filled fields."""
     random_audit = entity.AuditEntity()
     random_audit.type = cls.obj_audit
     random_audit.title = cls.generate_string(cls.obj_audit)
     random_audit.slug = cls.generate_slug()
     random_audit.status = element.AuditStates().PLANNED
     random_audit.contact = ObjectOwnersFactory().default().__dict__
     return random_audit
Ejemplo n.º 2
0
 def _create_random_audit(cls):
     """Create Audit entity with randomly and predictably filled fields."""
     random_audit = entity.AuditEntity()
     random_audit.title = cls.generate_title(cls.obj_audit)
     random_audit.type = cls.obj_audit
     random_audit.code = cls.generate_code()
     random_audit.audit_lead = roles.DEFAULT_USER
     random_audit.status = element.AuditStates().PLANNED
     return random_audit
Ejemplo n.º 3
0
 def create_empty(cls):
     """Create blank Audit object."""
     empty_audit = entity.AuditEntity()
     empty_audit.type = cls.obj_audit
     return empty_audit