Skip to content

Commit

Permalink
Edit tests and add has_confirmed to GamePlayer schema.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pokegali committed Dec 11, 2023
1 parent b5105bd commit 26792b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/schemas/schemas_elocaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class Config:

class GamePlayer(GamePlayerBase):
elo_gain: int | None
has_confirmed: bool
user: CoreUserSimple


Expand Down
6 changes: 3 additions & 3 deletions tests/test_elocaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ def test_validate_and_end_game():
f"/elocaps/games/{game.id}/validate",
headers={"Authorization": f"Bearer {tokens[0]}"},
).status_code
== 204
== 201
)
assert (
client.post(
f"/elocaps/games/{game.id}/validate",
headers={"Authorization": f"Bearer {tokens[1]}"},
).status_code
== 204
== 201
)
response = client.get(
f"/elocaps/games/{game.id}",
Expand Down Expand Up @@ -231,7 +231,7 @@ def test_create_game():
],
},
).status_code
== 204
== 201
)
response = client.get(
"/elocaps/games/latest",
Expand Down

0 comments on commit 26792b4

Please sign in to comment.