From fe5202431142ba4cc2be8778f0f01d8c6c0a0522 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 15 Jun 2026 16:39:31 -0400 Subject: [PATCH] test(gemini_cli_parity_regression): migrate to send_result() (Phase 2.4) The test_send_invokes_adapter_send test calls ai_client.send() and asserts the return value. Migrating to send_result() with assert res.ok and res.data == "Hello from mock adapter". Changes: - Rename ai_client.send(...) to ai_client.send_result(...) - Add assert res.ok before accessing res.data - Add "from src.result_types import Result" import 1 test passes. --- tests/test_gemini_cli_parity_regression.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_gemini_cli_parity_regression.py b/tests/test_gemini_cli_parity_regression.py index dd37fcf2..29c76d12 100644 --- a/tests/test_gemini_cli_parity_regression.py +++ b/tests/test_gemini_cli_parity_regression.py @@ -1,4 +1,5 @@ from unittest.mock import patch, MagicMock +from src.result_types import Result def test_send_invokes_adapter_send() -> None: import src.ai_client as ai_client @@ -9,5 +10,6 @@ def test_send_invokes_adapter_send() -> None: mock_process.returncode = 0 mock_popen.return_value = mock_process ai_client.set_provider("gemini_cli", "gemini-2.0-flash") - res = ai_client.send("context", "msg") - assert res == "Hello from mock adapter" + res = ai_client.send_result("context", "msg") + assert res.ok + assert res.data == "Hello from mock adapter"