def test_get_full_task(self): task = tasks_service.get_full_task(self.task.id) self.assertEqual(task["project"]["name"], self.project.name) self.assertEqual(task["assigner"]["id"], str(self.assigner.id)) self.assertEqual(task["persons"][0]["id"], str(self.person.id)) self.assertEqual(task["task_status"]["id"], str(self.task_status.id)) self.assertEqual(task["task_type"]["id"], str(self.task_type.id)) task = tasks_service.get_full_task(self.shot_task.id) self.assertEqual(task["sequence"]["id"], str(self.sequence.id))
def get(self, task_id): """ Return a task with many information. --- description: Full details for assignees, full details for task type, full details for task status, etc. tags: - Tasks parameters: - in: path name: task_id required: True schema: type: UUID example: a24a6ea4-ce75-4665-a070-57453082c25 responses: 200: description: Task with many information """ task = tasks_service.get_full_task(task_id) user_service.check_project_access(task["project_id"]) user_service.check_entity_access(task["entity_id"]) return task
def get(self, task_id): task = tasks_service.get_full_task(task_id) user_service.check_project_access(task["project_id"]) user_service.check_entity_access(task["entity_id"]) return task