Skip to content

Commit 831bbbb

Browse files
Trecekclaude
andcommitted
fix(review): use AsyncMock for async _open_kitchen_handler in test
test_cold_open_kitchen_runs_handler patched _open_kitchen_handler with MagicMock, but production code awaits it. await None raises TypeError. Switch to AsyncMock so the mock returns an awaitable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f22f009 commit 831bbbb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/server/test_open_kitchen_deferred_recall.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import json
66
from pathlib import Path
7-
from unittest.mock import MagicMock, patch
7+
from unittest.mock import AsyncMock, MagicMock, patch
88

99
import pytest
1010

@@ -376,7 +376,7 @@ async def test_cold_open_kitchen_runs_handler():
376376
with (
377377
patch("autoskillit.server._get_ctx", return_value=mock_ctx),
378378
patch.object(
379-
tools_kitchen, "_open_kitchen_handler", new_callable=MagicMock
379+
tools_kitchen, "_open_kitchen_handler", new_callable=AsyncMock
380380
) as mock_handler,
381381
):
382382
mock_handler.return_value = None

0 commit comments

Comments
 (0)