예제 #1
0
 def get(self, project_id, task_type_id):
     """
     Retrieve sequences schedule items for given task type
     ---
     tags:
       - Projects
     parameters:
       - in: path
         name: project_id
         required: true
         schema:
           type: UUID
           example: 5dc235ec-125e-4ba5-b1db-604d4babc315
       - in: path
         name: task_type_id
         required: true
         schema:
           type: UUID
           example: 5dc235ec-125e-4ba5-b1db-604d4babc315
     responses:
         200:
           description: All sequences schedule items for given task type
     """
     user_service.check_project_access(project_id)
     user_service.block_access_to_vendor()
     return schedule_service.get_sequences_schedule_items(
         project_id, task_type_id)
예제 #2
0
 def test_get_schedule_sequence_items(self):
     items = schedule_service.get_sequences_schedule_items(
         self.project.id, self.task_type_id)
     self.assertEqual(len(items), 1)
     self.assertEqual(items[0]["object_id"], self.sequence_id)
     self.assertEqual(items[0]["task_type_id"], self.task_type_id)
     self.assertEqual(items[0]["project_id"], self.project_id)
예제 #3
0
 def get(self, project_id, task_type_id):
     user_service.check_project_access(project_id)
     user_service.block_access_to_vendor()
     return schedule_service.get_sequences_schedule_items(
         project_id, task_type_id
     )