Exemplo n.º 1
0
 def _create_random_objective(cls):
     """Create Objective entity with randomly and predictably filled fields."""
     random_objective = ObjectiveEntity()
     random_objective.type = cls.obj_objective
     random_objective.title = cls.generate_string(cls.obj_objective)
     random_objective.slug = cls.generate_slug()
     random_objective.status = unicode(element.ObjectStates.DRAFT)
     random_objective.owners = [cls.default_person.__dict__]
     random_objective.os_state = unicode(element.ReviewStates.UNREVIEWED)
     return random_objective
Exemplo n.º 2
0
 def _create_random_objective(cls):
     """Create Objective entity with randomly and predictably filled fields."""
     random_objective = ObjectiveEntity()
     random_objective.type = cls.obj_objective
     random_objective.title = cls.generate_string(cls.obj_objective)
     random_objective.slug = cls.generate_slug()
     random_objective.status = unicode(element.ObjectStates.DRAFT)
     random_objective.contact = ObjectPersonsFactory().default().__dict__
     random_objective.owners = [ObjectPersonsFactory().default().__dict__]
     return random_objective
Exemplo n.º 3
0
 def _create_random_objective(cls):
   """Create Objective entity with randomly and predictably filled fields."""
   random_objective = ObjectiveEntity()
   random_objective.type = cls.obj_objective
   random_objective.title = cls.generate_string(cls.obj_objective)
   random_objective.slug = cls.generate_slug()
   random_objective.status = unicode(element.ObjectStates.DRAFT)
   random_objective.owners = [cls.default_person.__dict__]
   random_objective.os_state = unicode(element.ReviewStates.UNREVIEWED)
   return random_objective
Exemplo n.º 4
0
 def create_empty(cls):
     """Create blank Objective object."""
     empty_objective = ObjectiveEntity()
     empty_objective.type = cls.obj_objective
     empty_objective.custom_attributes = {None: None}
     return empty_objective
Exemplo n.º 5
0
 def create_empty(cls):
   """Create blank Objective object."""
   empty_objective = ObjectiveEntity()
   empty_objective.type = cls.obj_objective
   empty_objective.custom_attributes = {None: None}
   return empty_objective