def put(self, projectId: int): u = request.current_user logger.info("Update project:{} for user:{}".format(projectId, u.username)) return ProjectsService.update(user=u, projectId=projectId, data=api.payload)
def test_update_project(projects_fixture): user = db_session.query(User).get(1) data = { 'project': { 'name': 'new name', 'description': 'new description', }, } proj = ProjectsService.update(user, projects_fixture.id, data) assert proj.name == "new name" assert proj.description == "new description"