diff --git a/testing/helpers.py b/testing/helpers.py index 20b00b1..5f2f367 100644 --- a/testing/helpers.py +++ b/testing/helpers.py @@ -25,7 +25,7 @@ signReportPath = base_url + "/api/signReport" addUserToProjectPath = base_url + "/api/addUserToProject" promoteToAdminPath = base_url + "/api/promoteToAdmin" getUserProjectsPath = base_url + "/api/getUserProjects" -getWeeklyReportsUserPath = base_url + "/api/getWeeklyReportsUser" +getAllWeeklyReportsPath = base_url + "/api/getAllWeeklyReports" checkIfProjectManagerPath = base_url + "/api/checkIfProjectManager" ProjectRoleChangePath = base_url + "/api/ProjectRoleChange" getUsersProjectPath = base_url + "/api/getUsersProject" diff --git a/testing/testing.py b/testing/testing.py index a2dfb64..ba38ced 100644 --- a/testing/testing.py +++ b/testing/testing.py @@ -217,14 +217,15 @@ def test_sign_report(): # Test function to get weekly reports for a user in a project -def test_get_weekly_reports_user(): +def test_get_all_weekly_reports(): # Log in as the user token = login(username, "always_same").json()["token"] # Get weekly reports for the user in the project response = requests.get( - getWeeklyReportsUserPath + "/" + projectName, + getAllWeeklyReportsPath + "/" + projectName, headers={"Authorization": "Bearer " + token}, + params={"targetUser": username}, ) dprint(response.text) @@ -507,7 +508,7 @@ if __name__ == "__main__": test_get_project() test_sign_report() test_add_user_to_project() - test_get_weekly_reports_user() + test_get_all_weekly_reports() test_check_if_project_manager() test_ProjectRoleChange() test_ensure_manager_of_created_project()