def _create_random_program(cls):
     """Create Program entity with randomly and predictably filled fields."""
     random_program = ProgramEntity()
     random_program.type = cls.obj_program
     random_program.title = cls.generate_string(cls.obj_program)
     random_program.slug = cls.generate_slug()
     random_program.status = unicode(element.ObjectStates.DRAFT)
     random_program.manager = cls.default_person.__dict__
     random_program.contact = cls.default_person.__dict__
     random_program.os_state = unicode(element.ReviewStates.UNREVIEWED)
     return random_program
 def _create_random_program(cls):
     """Create Program entity with randomly and predictably filled fields."""
     random_program = ProgramEntity()
     random_program.type = cls.obj_program
     random_program.title = cls.generate_string(cls.obj_program)
     random_program.slug = cls.generate_slug()
     random_program.status = unicode(element.ObjectStates.DRAFT)
     random_program.manager = ObjectPersonsFactory().default().__dict__
     random_program.contact = ObjectPersonsFactory().default().__dict__
     return random_program
Exemple #3
0
 def _create_random_program(cls):
   """Create Program entity with randomly and predictably filled fields."""
   random_program = ProgramEntity()
   random_program.type = cls.obj_program
   random_program.title = cls.generate_string(cls.obj_program)
   random_program.slug = cls.generate_slug()
   random_program.status = unicode(element.ObjectStates.DRAFT)
   random_program.manager = cls.default_person.__dict__
   random_program.contact = cls.default_person.__dict__
   random_program.os_state = unicode(element.ReviewStates.UNREVIEWED)
   return random_program
Exemple #4
0
 def create_empty(cls):
     """Create blank Program object."""
     empty_program = ProgramEntity()
     empty_program.type = cls.obj_program
     empty_program.custom_attributes = {None: None}
     return empty_program
Exemple #5
0
 def create_empty(cls):
   """Create blank Program object."""
   empty_program = ProgramEntity()
   empty_program.type = cls.obj_program
   empty_program.custom_attributes = {None: None}
   return empty_program