Ejemplo n.º 1
0
 def create_empty(cls):
     """Create blank Audit object."""
     empty_audit = AuditEntity()
     empty_audit.type = cls.obj_audit
     empty_audit.custom_attributes = {None: None}
     empty_audit.access_control_list = []
     return empty_audit
Ejemplo n.º 2
0
 def _create_random_audit(cls):
     """Create Audit entity with randomly and predictably filled fields."""
     random_audit = 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 = unicode(element.AuditStates().PLANNED)
     random_audit.contact = cls.default_person.__dict__
     return random_audit
Ejemplo n.º 3
0
 def _create_random_audit(cls):
     """Create Audit entity with randomly and predictably filled fields."""
     random_audit = 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 = unicode(element.AuditStates().PLANNED)
     random_audit.contact = cls.default_person.__dict__
     random_audit.access_control_list = [
         ObjectPersonsFactory.get_acl_member(roles.AUDIT_CAPTAIN_ID,
                                             cls.default_person)
     ]
     return random_audit
Ejemplo n.º 4
0
 def _create_random_audit(cls):
   """Create Audit entity with randomly and predictably filled fields."""
   random_audit = 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 = unicode(element.AuditStates().PLANNED)
   random_audit.contact = cls.default_person.__dict__
   return random_audit
Ejemplo n.º 5
0
 def create_empty(cls):
     """Create blank Audit object."""
     empty_audit = AuditEntity()
     empty_audit.type = cls.obj_audit
     empty_audit.custom_attributes = {None: None}
     return empty_audit
Ejemplo n.º 6
0
 def create_empty(cls):
   """Create blank Audit object."""
   empty_audit = AuditEntity()
   empty_audit.type = cls.obj_audit
   empty_audit.custom_attributes = {None: None}
   return empty_audit