Skip to content

Commit 8c2b8f0

Browse files
committed
Fix test assertions - mode is 4th arg not 3rd
1 parent 8a5e178 commit 8c2b8f0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/test_ssh_server.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ async def test_play_mode_default(self):
6262
mock_menu.return_value = None
6363
await handle_client(process)
6464

65-
# Verify mode was 'play'
65+
# Verify mode was 'play' (4th arg: process, session, username, mode)
6666
mock_menu.assert_called_once()
6767
call_args = mock_menu.call_args
68-
assert call_args[0][2] == "play" # mode argument
68+
assert call_args[0][3] == "play" # mode is 4th positional arg
6969

7070
@pytest.mark.asyncio
7171
async def test_learn_mode(self):
@@ -85,7 +85,7 @@ async def test_learn_mode(self):
8585
await handle_client(process)
8686

8787
call_args = mock_menu.call_args
88-
assert call_args[0][2] == "tutorial"
88+
assert call_args[0][3] == "tutorial" # mode is 4th positional arg
8989

9090
@pytest.mark.asyncio
9191
async def test_watch_mode(self):
@@ -105,7 +105,7 @@ async def test_watch_mode(self):
105105
await handle_client(process)
106106

107107
call_args = mock_menu.call_args
108-
assert call_args[0][2] == "spectate"
108+
assert call_args[0][3] == "spectate" # mode is 4th positional arg
109109

110110

111111
class TestChessBoard:

0 commit comments

Comments
 (0)