Ejemplo n.º 1
0
 def _create_random_asmt(cls):
     """Create Assessment entity with randomly and predictably filled fields."""
     random_asmt = entity.AssessmentEntity()
     random_asmt.type = cls.obj_asmt
     random_asmt.title = cls.generate_string(cls.obj_asmt)
     random_asmt.slug = cls.generate_slug()
     random_asmt.status = element.AssessmentStates.NOT_STARTED
     random_asmt.recipients = ",".join(
         (roles.ASSESSOR, roles.CREATOR, roles.VERIFIER))
     random_asmt.verified = element.Common.FALSE
     return random_asmt
Ejemplo n.º 2
0
 def _create_random_asmt(cls):
     """Create Assessment entity with randomly and predictably filled fields."""
     random_asmt = entity.AssessmentEntity()
     random_asmt.title = cls.generate_title(cls.obj_asmt)
     random_asmt.type = cls.obj_asmt
     random_asmt.code = cls.generate_code()
     random_asmt.object = roles.DEFAULT_USER
     random_asmt.creators = roles.DEFAULT_USER
     random_asmt.assignees = roles.DEFAULT_USER
     random_asmt.state = element.AssessmentStates.NOT_STARTED
     random_asmt.is_verified = element.Common.FALSE
     return random_asmt
Ejemplo n.º 3
0
 def _create_random_asmt(cls):
     """Create Assessment entity with randomly and predictably filled fields."""
     random_asmt = entity.AssessmentEntity()
     random_asmt.type = cls.obj_asmt
     random_asmt.title = cls.generate_string(cls.obj_asmt)
     random_asmt.slug = cls.generate_slug()
     random_asmt.status = element.AssessmentStates.NOT_STARTED
     random_asmt.recipients = ",".join(
         (roles.ASSESSOR, roles.CREATOR, roles.VERIFIER))
     random_asmt.verified = False
     random_asmt.owners = [ObjectOwnersFactory().default().__dict__]
     return random_asmt
Ejemplo n.º 4
0
 def create_empty(cls):
     """Create blank Assessment object."""
     empty_asmt = entity.AssessmentEntity()
     empty_asmt.type = cls.obj_asmt
     return empty_asmt