diff --git a/server/tests/test_app.py b/server/tests/test_app.py index c87882b8bff28c4c54f08cfb945d8508621aa031..31d4d2b5d1ffc785c85d6dee045a408e4073fea7 100644 --- a/server/tests/test_app.py +++ b/server/tests/test_app.py @@ -397,19 +397,7 @@ def test_question_api(client): assert response.status_code == http_codes.OK headers = {"Authorization": "Bearer " + body["access_token"]} - # Get questions from empty competition - CID = 1 # TODO: Fix api-calls so that the ones not using CID don't require one - slide_order = 1 - response, body = get(client, f"/api/competitions/{CID}/questions", headers=headers) - assert response.status_code == http_codes.OK - assert body["count"] == 0 - - # Get questions from another competition that should have some questions - CID = 3 - response, body = get(client, f"/api/competitions/{CID}/questions", headers=headers) num_questions = 3 - assert response.status_code == http_codes.OK - assert body["count"] == num_questions # Add question name = "Nytt namn" @@ -417,7 +405,7 @@ def test_question_api(client): slide_order = 6 response, item_question = post( client, - f"/api/competitions/{CID}/slides/{slide_order}/questions", + f"/api/competitions/{3}/slides/{slide_order}/questions", {"name": name, "type_id": type_id}, headers=headers, ) @@ -426,10 +414,6 @@ def test_question_api(client): assert item_question["type_id"] == type_id num_questions += 1 - # Checks number of questions - response, body = get(client, f"/api/competitions/{CID}/questions", headers=headers) - assert response.status_code == http_codes.OK - assert body["count"] == num_questions """ # Delete question response, _ = delete(client, f"/api/competitions/{CID}/slides/{slide_order}/questions/{QID}", headers=headers)