fix(conductor): Apply review suggestions for track 'test_curation_20260225'

This commit is contained in:
2026-02-25 22:05:28 -05:00
parent 56025a84e9
commit c23966061c
5 changed files with 18 additions and 10 deletions

View File

@@ -16,8 +16,10 @@ def test_ai_client_send_gemini_cli():
# 1. Mock 'ai_client.GeminiCliAdapter' (which we will add)
with patch('ai_client.GeminiCliAdapter') as MockAdapterClass:
mock_adapter_instance = MockAdapterClass.return_value
mock_adapter_instance.send.return_value = test_response
mock_adapter_instance.send.return_value = {"text": test_response, "tool_calls": []}
mock_adapter_instance.last_usage = {"total_tokens": 100}
mock_adapter_instance.last_latency = 0.5
mock_adapter_instance.session_id = "test-session"
# Verify that 'events' are emitted correctly
with patch.object(ai_client.events, 'emit') as mock_emit:

View File

@@ -75,7 +75,8 @@ class TestGeminiCliAdapter(unittest.TestCase):
result = self.adapter.send("test message")
self.assertEqual(result, "The quick brown fox jumps.")
self.assertEqual(result["text"], "The quick brown fox jumps.")
self.assertEqual(result["tool_calls"], [])
@patch('subprocess.Popen')
def test_send_handles_tool_use_events(self, mock_popen):
@@ -100,7 +101,9 @@ class TestGeminiCliAdapter(unittest.TestCase):
result = self.adapter.send("read test.txt")
# Result should contain the combined text from all 'message' events
self.assertEqual(result, "Calling tool...\nFile read successfully.")
self.assertEqual(result["text"], "Calling tool...\nFile read successfully.")
self.assertEqual(len(result["tool_calls"]), 1)
self.assertEqual(result["tool_calls"][0]["name"], "read_file")
@patch('subprocess.Popen')
def test_send_captures_usage_metadata(self, mock_popen):