コード例 #1
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
コード例 #2
0
ファイル: entities_factory.py プロジェクト: Smotko/ggrc-core
 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
コード例 #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