Skip to content

Commit 07e4088

Browse files
More tests
1 parent 98c9622 commit 07e4088

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/server/request_handlers/test_jsonrpc_handler.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ async def test_on_get_task_success(self) -> None:
113113
)
114114
self.assertIsInstance(response.root, GetTaskSuccessResponse)
115115
assert response.root.result == mock_task # type: ignore
116-
mock_task_store.get.assert_called_once_with(task_id)
116+
mock_task_store.get.assert_called_once_with(task_id, unittest.mock.ANY)
117117

118118
async def test_on_get_task_not_found(self) -> None:
119119
mock_agent_executor = AsyncMock(spec=AgentExecutor)
@@ -206,7 +206,9 @@ async def test_on_cancel_task_not_found(self) -> None:
206206
response = await handler.on_cancel_task(request)
207207
self.assertIsInstance(response.root, JSONRPCErrorResponse)
208208
assert response.root.error == TaskNotFoundError() # type: ignore
209-
mock_task_store.get.assert_called_once_with('nonexistent_id')
209+
mock_task_store.get.assert_called_once_with(
210+
'nonexistent_id', unittest.mock.ANY
211+
)
210212
mock_agent_executor.cancel.assert_not_called()
211213

212214
@patch(

0 commit comments

Comments
 (0)