コード例 #1
0
 def setUp(self):
     super().setUp()
     self.request_client = APIClient(enforce_csrf_checks=True)
     self.request_client.force_authenticate(user=SignedUser())
     self.workflow_version = WorkflowVersionFactory()
     self.step = StepFactory(slug='step-slug',
                             workflow_version=self.workflow_version)
     self.project = ProjectFactory(workflow_version=self.workflow_version)
コード例 #2
0
 def setUp(self):
     super().setUp()
     setup_models(self)
     self.workflow_version = WorkflowVersionFactory()
     self.step = StepFactory(
         slug='step-slug',
         workflow_version=self.workflow_version)
     self.project = ProjectFactory(
         workflow_version=self.workflow_version)
コード例 #3
0
 def setUp(self):
     super().setUp()
     self.request_client = APIClient(enforce_csrf_checks=True)
     self.request_client.force_authenticate(user=SignedUser())
     setup_models(self)
     self.workflow_version = WorkflowVersionFactory()
     self.step = StepFactory(slug='step-slug',
                             workflow_version=self.workflow_version)
     self.project = ProjectFactory(workflow_version=self.workflow_version)
     self.list_url = reverse('orchestra:api:todo-api-list')
     self.todo = TodoFactory(project=self.project)
     self.todo_with_step = TodoFactory(project=self.project, step=self.step)
コード例 #4
0
    def setUp(self):
        super().setUp()
        self.request_client = APIClient(enforce_csrf_checks=True)
        self.request_client.force_authenticate(user=SignedUser())

        self.todolist_template_slug = 'test_todolist_template_slug'
        self.todolist_template_name = 'test_todolist_template_name'
        self.todolist_template_description = \
            'test_todolist_template_description'
        self.workflow_version = WorkflowVersionFactory()
        self.step = StepFactory(slug='step-slug',
                                workflow_version=self.workflow_version)
        self.project = ProjectFactory(workflow_version=self.workflow_version)
コード例 #5
0
 def setUp(self):
     super().setUp()
     setup_models(self)
     self.worker = Worker.objects.get(user__username='******')
     self.request_client.login(username=self.worker.user.username,
                               password='******')
     self.list_create_url = reverse('orchestra:todos:todos-list')
     self.list_details_url_name = 'orchestra:todos:todos-detail'
     self.workflow_version = WorkflowVersionFactory()
     self.step = StepFactory(slug='step-slug',
                             workflow_version=self.workflow_version)
     self.project = ProjectFactory(workflow_version=self.workflow_version)
     tasks = Task.objects.filter(assignments__worker=self.worker)
     task = tasks[0]
     task.project = self.project
     task.step = self.step
     task.save()
     self.todo_title = 'Let us do this'
     self.deadline = parse('2018-01-16T07:03:00+00:00')
コード例 #6
0
 def setUp(self):
     super().setUp()
     setup_models(self)
     self.worker = Worker.objects.get(user__username='******')
     self.request_client.login(username=self.worker.user.username,
                               password='******')
     self.todolist_template_list_url = reverse(
         'orchestra:todos:todolist_templates')
     self.todolist_template_detail_url_name = \
         'orchestra:todos:todolist_template'
     self.todolist_template_slug = 'test_todolist_template_slug'
     self.todolist_template_name = 'test_todolist_template_name'
     self.todolist_template_description = \
         'test_todolist_template_description'
     self.workflow_version = WorkflowVersionFactory()
     self.step = StepFactory(slug='step-slug',
                             workflow_version=self.workflow_version)
     self.project = ProjectFactory(workflow_version=self.workflow_version)
     self.project2 = ProjectFactory()
     tasks = Task.objects.filter(assignments__worker=self.worker)
     self.task = tasks[0]
     self.task.project = self.project
     self.task.step = self.step
     self.task.save()