Tests for getAllWeeklyReports
This commit is contained in:
parent
fcd035fe6e
commit
9c5aa10414
2 changed files with 5 additions and 4 deletions
|
@ -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"
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue