diff --git a/mondey_backend/src/mondey_backend/routers/users.py b/mondey_backend/src/mondey_backend/routers/users.py index 580ebcfa..69fdd774 100644 --- a/mondey_backend/src/mondey_backend/routers/users.py +++ b/mondey_backend/src/mondey_backend/routers/users.py @@ -261,7 +261,6 @@ def get_milestonegroups_for_session( answersession = get(session, MilestoneAnswerSession, answersession_id) return get_milestonegroups_for_answersession(session, answersession) - @router.get( "/feedback/answersession={answersession_id}/summary", response_model=dict[int, int], @@ -271,7 +270,7 @@ def get_summary_feedback_for_answersession( answersession_id: int, ) -> dict[int, int]: answersession = session.get(MilestoneAnswerSession, answersession_id) - if answersession is None: + if answersession is None: raise HTTPException(404, detail="Answer session not found") child_id = answersession.child_id feedback = compute_milestonegroup_feedback_summary( @@ -288,7 +287,7 @@ def get_detailed_feedback_for_answersession( answersession_id: int, ) -> dict[int, dict[int, int]]: answersession = session.get(MilestoneAnswerSession, answersession_id) - if answersession is None: + if answersession is None: raise HTTPException(404, detail="Answer session not found") child_id = answersession.child_id feedback = compute_milestonegroup_feedback_detailed( diff --git a/mondey_backend/tests/routers/test_users.py b/mondey_backend/tests/routers/test_users.py index 29fcb7dc..cddea0cf 100644 --- a/mondey_backend/tests/routers/test_users.py +++ b/mondey_backend/tests/routers/test_users.py @@ -358,15 +358,18 @@ def test_get_summary_feedback_for_session(user_client: TestClient): assert response.status_code == 200 assert response.json() == {"1": 2} -def test_get_summary_feedback_for_session_invalid(user_client: TestClient): + +def test_get_summary_feedback_for_session_invalid(user_client: TestClient): response = user_client.get("/users/feedback/answersession=12/summary") assert response.status_code == 404 + def test_get_detailed_feedback_for_session(user_client: TestClient): response = user_client.get("/users/feedback/answersession=1/detailed") assert response.status_code == 200 assert response.json() == {"1": {"1": 2, "2": 2}} -def test_get_detailed_feedback_for_session_invalid(user_client: TestClient): + +def test_get_detailed_feedback_for_session_invalid(user_client: TestClient): response = user_client.get("/users/feedback/answersession=12/detailed") assert response.status_code == 404