mirror of
https://github.com/ghndrx/shellmate.git
synced 2026-02-10 14:55:08 +00:00
Fix test assertions - mode is 4th arg not 3rd
This commit is contained in:
@@ -62,10 +62,10 @@ class TestModeSelection:
|
|||||||
mock_menu.return_value = None
|
mock_menu.return_value = None
|
||||||
await handle_client(process)
|
await handle_client(process)
|
||||||
|
|
||||||
# Verify mode was 'play'
|
# Verify mode was 'play' (4th arg: process, session, username, mode)
|
||||||
mock_menu.assert_called_once()
|
mock_menu.assert_called_once()
|
||||||
call_args = mock_menu.call_args
|
call_args = mock_menu.call_args
|
||||||
assert call_args[0][2] == "play" # mode argument
|
assert call_args[0][3] == "play" # mode is 4th positional arg
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_learn_mode(self):
|
async def test_learn_mode(self):
|
||||||
@@ -85,7 +85,7 @@ class TestModeSelection:
|
|||||||
await handle_client(process)
|
await handle_client(process)
|
||||||
|
|
||||||
call_args = mock_menu.call_args
|
call_args = mock_menu.call_args
|
||||||
assert call_args[0][2] == "tutorial"
|
assert call_args[0][3] == "tutorial" # mode is 4th positional arg
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_watch_mode(self):
|
async def test_watch_mode(self):
|
||||||
@@ -105,7 +105,7 @@ class TestModeSelection:
|
|||||||
await handle_client(process)
|
await handle_client(process)
|
||||||
|
|
||||||
call_args = mock_menu.call_args
|
call_args = mock_menu.call_args
|
||||||
assert call_args[0][2] == "spectate"
|
assert call_args[0][3] == "spectate" # mode is 4th positional arg
|
||||||
|
|
||||||
|
|
||||||
class TestChessBoard:
|
class TestChessBoard:
|
||||||
|
|||||||
Reference in New Issue
Block a user