diff --git a/server/tests/test_app.py b/server/tests/test_app.py index e1389d3e07539d5c76a13750fae9e666f6d66488..cf35c54c91c792c34e2185787e56bf3aed9bb252 100644 --- a/server/tests/test_app.py +++ b/server/tests/test_app.py @@ -112,7 +112,7 @@ def test_competition_api(client): response, body = get(client, f"/api/competitions/{competition_id}/slides", headers=headers) assert response.status_code == http_codes.OK - assert len(body["items"]) == 2 + assert len(body) == 2 """ response, body = put(client, f"/api/competitions/{competition_id}/slides/{2}/order", {"order": 1}, headers=headers) @@ -124,11 +124,11 @@ def test_competition_api(client): response, body = get(client, f"/api/competitions/{competition_id}/teams", headers=headers) assert response.status_code == http_codes.OK - assert len(body["items"]) == 1 - assert body["items"][0]["name"] == "t1" + assert len(body) == 1 + assert body[0]["name"] == "t1" - response, body = delete(client, f"/api/competitions/{competition_id}", headers=headers) - assert response.status_code == http_codes.OK + response, body = delete(client, f"/api/competitions/{competition_id}", headers=headqers) + assert response.status_code == http_codes.NO_CONTENT # Get competition competition_id = 2 @@ -203,7 +203,7 @@ def test_auth_and_user_api(client): assert body["count"] == 1 # Get user from ID - searched_user = body["items"][0] + searched_user = body[0] user_id = searched_user["id"] response, body = get(client, f"/api/users/{user_id}", headers=headers) assert response.status_code == http_codes.OK @@ -339,8 +339,8 @@ def test_slide_api(client): response, body = get(client, f"/api/competitions/{CID}/slides", headers=headers) assert response.status_code == http_codes.OK assert body["count"] == 3 - assert body["items"][0]["id"] == 3 - assert body["items"][0]["order"] == 0 + assert body[0]["id"] == 3 + assert body[0]["order"] == 0 slide_id = 3 """