Skip to content

Commit

Permalink
adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MaHaWo committed Dec 18, 2024
1 parent b30078d commit 9195809
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mondey_backend/tests/routers/test_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def test_update_current_child_answers_no_prexisting(
def test_get_summary_feedback_for_session(user_client: TestClient):
response = user_client.get("/users/feedback/answersession=1/summary")
assert response.status_code == 200
assert response.json() == {"1": 2}
assert response.json() == {"1": 1}


def test_get_summary_feedback_for_session_invalid(user_client: TestClient):
Expand All @@ -366,7 +366,7 @@ def test_get_summary_feedback_for_session_invalid(user_client: TestClient):
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}}
assert response.json() == {"1": {"1": 1, "2": 1}}


def test_get_detailed_feedback_for_session_invalid(user_client: TestClient):
Expand Down
4 changes: 2 additions & 2 deletions mondey_backend/tests/utils/test_scores.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ def test_compute_feedback_simple():
expected_score=1.0,
)
score = 0
assert compute_feedback_simple(dummy_scores, score) == -2
assert compute_feedback_simple(dummy_scores, score) == -1

score = 1
assert compute_feedback_simple(dummy_scores, score) == 0

score = 3
assert compute_feedback_simple(dummy_scores, score) == 2
assert compute_feedback_simple(dummy_scores, score) == 1

dummy_scores = MilestoneGroupAgeScore(
milestonegroup_id=1,
Expand Down

0 comments on commit 9195809

Please sign in to comment.