def test_remove_task_status(self):
     self.generate_fixture_task_status()
     projects_service.add_task_status_setting(self.project.id,
                                              self.task_status.id)
     projects_service.remove_task_status_setting(self.project.id,
                                                 self.task_status.id)
     project = projects_service.get_project_with_relations(self.project.id)
     self.assertEqual(project["task_statuses"], [])
Beispiel #2
0
 def post(self, project_id):
     args = self.get_args([("task_status_id", "", True)])
     project = projects_service.add_task_status_setting(
         project_id,
         args["task_status_id"]
     )
     return project, 201
Beispiel #3
0
 def post(self, project_id):
     """
     Add a task type linked to a production.
     ---
     tags:
       - Projects
     parameters:
       - in: path
         name: project_id
         required: true
         schema:
           type: UUID
           example: 5dc235ec-125e-4ba5-b1db-604d4babc315
     responses:
         201:
           description: Task type added to production
     """
     args = self.get_args([("task_status_id", "", True)])
     user_service.check_manager_project_access(project_id)
     project = projects_service.add_task_status_setting(
         project_id, args["task_status_id"])
     return project, 201