Skip to content

Commit f372f37

Browse files
committed
fix(tests): up-to-date
1 parent a0d726d commit f372f37

File tree

4 files changed

+10
-19
lines changed

4 files changed

+10
-19
lines changed

tests/test_ttt/test_entities/test_core/conftest.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from pytest import fixture
44

55
from ttt.entities.core.user.account import Account
6-
from ttt.entities.core.user.location import UserGameLocation
76
from ttt.entities.core.user.user import User
87
from ttt.entities.math.random import Random
98
from ttt.entities.text.emoji import Emoji
@@ -28,7 +27,7 @@ def user1() -> User:
2827
emojis=[],
2928
selected_emoji_id=None,
3029
rating=1000.,
31-
game_location=UserGameLocation(1, UUID(int=0)),
30+
current_game_id=UUID(int=0),
3231
admin_right=None,
3332
)
3433

@@ -41,7 +40,7 @@ def user2() -> User:
4140
emojis=[],
4241
rating=1000.,
4342
selected_emoji_id=None,
44-
game_location=UserGameLocation(2, UUID(int=0)),
43+
current_game_id=UUID(int=0),
4544
admin_right=None,
4645
)
4746

tests/test_ttt/test_entities/test_core/test_game.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ def game(
120120
user2,
121121
emoji2,
122122
standard_board,
123-
9,
124123
None,
125124
GameState.wait_player1,
126125
)
@@ -162,7 +161,6 @@ def test_not_standard_board(
162161
user2,
163162
emoji2,
164163
not_standard_board,
165-
9,
166164
None,
167165
GameState.wait_player1,
168166
)
@@ -182,7 +180,6 @@ def test_one_user(
182180
user1,
183181
emoji2,
184182
standard_board,
185-
9,
186183
None,
187184
GameState.wait_player1,
188185
)
@@ -202,7 +199,6 @@ def test_one_emoji(
202199
user2,
203200
emoji1,
204201
standard_board,
205-
9,
206202
None,
207203
GameState.wait_player1,
208204
)
@@ -223,7 +219,6 @@ def test_game_with_invalid_cell_order(
223219
user2,
224220
emoji2,
225221
board_with_invalid_cell_order,
226-
9,
227222
None,
228223
GameState.wait_player1,
229224
)
@@ -280,7 +275,6 @@ def test_make_move_with_completed_game( # noqa: PLR0913, PLR0917
280275
user2,
281276
emoji2,
282277
standard_board,
283-
9,
284278
DecidedGameResult(
285279
win=UserWin(user_id=1, new_stars=20, rating_vector=20.),
286280
loss=UserLoss(user_id=2, rating_vector=-20.),
@@ -428,7 +422,7 @@ def test_winning_game( # noqa: PLR0913, PLR0917
428422
emojis=[],
429423
rating=1020.0,
430424
selected_emoji_id=None,
431-
game_location=None,
425+
current_game_id=None,
432426
admin_right=None,
433427
)
434428

@@ -439,7 +433,7 @@ def test_winning_game( # noqa: PLR0913, PLR0917
439433
emojis=[],
440434
rating=981.1500225556907,
441435
selected_emoji_id=None,
442-
game_location=None,
436+
current_game_id=None,
443437
admin_right=None,
444438
)
445439

@@ -515,7 +509,7 @@ def test_drawn_game( # noqa: PLR0913, PLR0917
515509
emojis=[],
516510
rating=1020.0,
517511
selected_emoji_id=None,
518-
game_location=None,
512+
current_game_id=None,
519513
admin_right=None,
520514
)
521515

@@ -526,7 +520,7 @@ def test_drawn_game( # noqa: PLR0913, PLR0917
526520
emojis=[],
527521
rating=1020.0,
528522
selected_emoji_id=None,
529-
game_location=None,
523+
current_game_id=None,
530524
admin_right=None,
531525
)
532526

@@ -602,7 +596,7 @@ def test_winning_game_with_filled_board( # noqa: PLR0913, PLR0917
602596
emojis=[],
603597
rating=1020.0,
604598
selected_emoji_id=None,
605-
game_location=None,
599+
current_game_id=None,
606600
admin_right=None,
607601
)
608602

@@ -613,7 +607,7 @@ def test_winning_game_with_filled_board( # noqa: PLR0913, PLR0917
613607
emojis=[],
614608
rating=981.1500225556907,
615609
selected_emoji_id=None,
616-
game_location=None,
610+
current_game_id=None,
617611
admin_right=None,
618612
)
619613

tests/test_ttt/test_entities/test_core/test_user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def test_create_user(tracking: Tracking, object_: str) -> None:
1616
emojis=[],
1717
rating=1000.,
1818
selected_emoji_id=None,
19-
game_location=None,
19+
current_game_id=None,
2020
admin_right=None,
2121
)
2222

tests/test_ttt/test_infrastructure/test_adapters/test_game_dao.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from ttt.entities.core.game.cell import Cell
99
from ttt.entities.core.game.game import Game, GameState
1010
from ttt.entities.core.user.account import Account
11-
from ttt.entities.core.user.location import UserGameLocation
1211
from ttt.entities.core.user.user import User
1312
from ttt.entities.elo.rating import GamesPlayed
1413
from ttt.entities.math.matrix import Matrix
@@ -31,7 +30,7 @@ def player1() -> User:
3130
emojis=[],
3231
selected_emoji_id=None,
3332
rating=1000.,
34-
game_location=UserGameLocation(1, UUID(int=0)),
33+
current_game_id=UUID(int=0),
3534
admin_right=None,
3635
)
3736

@@ -69,7 +68,6 @@ def game(player1: User, player2: Ai) -> Game:
6968
Cell(UUID(int=0), UUID(int=0), (2, 2), None, None),
7069
],
7170
]),
72-
number_of_unfilled_cells=9,
7371
result=None,
7472
state=GameState.wait_player1,
7573
)

0 commit comments

Comments
 (0)