Example #1
0
 def delete(self, project_id, person_id):
     """
     Remove people listed in a production team.
     ---
     tags:
       - Projects
     parameters:
       - in: path
         name: project_id
         required: true
         schema:
           type: UUID
           example: 5dc235ec-125e-4ba5-b1db-604d4babc315
       - in: path
         name: person_id
         required: true
         schema:
           type: UUID
           example: 5dc235ec-125e-4ba5-b1db-604d4babc315
     responses:
         204:
           description: Person removed from production team
     """
     user_service.check_manager_project_access(project_id)
     projects_service.remove_team_member(project_id, person_id)
     return "", 204
Example #2
0
 def test_remove_team_member(self):
     self.generate_fixture_person()
     projects_service.add_team_member(self.project.id, self.person.id)
     projects_service.remove_team_member(self.project.id, self.person.id)
     project = projects_service.get_project_with_relations(self.project.id)
     self.assertEqual(project["team"], [])
Example #3
0
 def delete(self, project_id, person_id):
     user_service.check_manager_project_access(project_id)
     projects_service.remove_team_member(project_id, person_id)
     return '', 204
Example #4
0
 def delete(self, project_id, person_id):
     user_service.check_manager_project_access(project_id)
     project = projects_service.remove_team_member(project_id, person_id)
     return fields.serialize_value(project), 204