Beispiel #1
0
 def reset(self):
     StateFactory.reset_sequence(1)
     ChecklistFactory.reset_sequence(1)
     TransitionFactory.reset_sequence(1)
     WorkflowFactory.reset_sequence(1)
     ProjectFactory.reset_sequence(1)
     TaskFactory.reset_sequence(1)
     DeveloperFactory.reset_sequence(1)
     # ProjectFactory.created_by_id.reset()
     ProjectFactory.project_type.reset()
     # WorkflowFactory.created_by_id.reset()
     TaskFactory.issue_type.reset()
Beispiel #2
0
    def create_workflow(self):
        from project_management_portal.models import Transition
        self.reset()
        states = StateFactory.create_batch(size=4)
        checklist = ChecklistFactory.create_batch(size=5)
        TransitionFactory(from_state_id=1, to_state_id=2, checklist=checklist)
        TransitionFactory(from_state_id=2, to_state_id=3, checklist=checklist)
        TransitionFactory(from_state_id=3, to_state_id=4, checklist=checklist)
        TransitionFactory(from_state_id=2, to_state_id=1, checklist=checklist)
        TransitionFactory(from_state_id=3, to_state_id=1, checklist=checklist)

        transitions = Transition.objects.all()
        workflow = WorkflowFactory.create(states=states,
                                          transitions=transitions)

        return workflow
Beispiel #3
0
 def create_task(self):
     self.reset()
     checklist = ChecklistFactory.create_batch(size=5)
     TaskFactory(state_id=1, conditions_satisfied=checklist)