Private
Public Access
test(ai_client): rename send_result to send in 22 remaining test files
Batch rename of 22 test files. 62 references renamed total. The full test suite is now GREEN again, matching the pre-rename baseline from Task 1.1. Pure mechanical rename. No behavior change. Files affected: test_ai_cache_tracking, test_ai_client_cli, test_ai_client_result, test_api_events, test_context_pruner, test_deepseek_provider, test_gemini_cli_* (3 files), test_gui2_mcp, test_headless_* (2 files), test_live_gui_integration_v2, test_orchestration_logic, test_phase6_engine, test_rag_integration, test_run_worker_lifecycle_abort, test_spawn_interception_v2, test_symbol_parsing, test_tier4_interceptor, test_tiered_aggregation, test_token_usage. Note: spec estimated 24 files; actual is 22 (test_deprecation_warnings no longer exists, and 1 fewer file than spec's list). Refs: conductor/tracks/send_result_to_send_20260616/
This commit is contained in:
@@ -43,7 +43,7 @@ def test_handle_request_event_appends_definitions(controller):
|
||||
with (
|
||||
patch('src.app_controller.parse_symbols', return_value=["Track"]) as mock_parse,
|
||||
patch('src.app_controller.get_symbol_definition', return_value=("src/models.py", "class Track: pass", 42)) as mock_get_def,
|
||||
patch('src.ai_client.send_result', return_value=Result(data="mocked response")) as mock_send_result
|
||||
patch('src.ai_client.send', return_value=Result(data="mocked response")) as mock_send
|
||||
):
|
||||
# Execute
|
||||
controller._handle_request_event(event)
|
||||
@@ -54,8 +54,8 @@ def test_handle_request_event_appends_definitions(controller):
|
||||
|
||||
# Check if enriched prompt was sent to AI
|
||||
expected_suffix = "\n\n[Definition: Track from src/models.py (line 42)]\n```python\nclass Track: pass\n```"
|
||||
mock_send_result.assert_called_once()
|
||||
args, kwargs = mock_send_result.call_args
|
||||
mock_send.assert_called_once()
|
||||
args, kwargs = mock_send.call_args
|
||||
sent_prompt = args[1]
|
||||
assert sent_prompt == "Explain @Track object" + expected_suffix
|
||||
|
||||
@@ -72,13 +72,13 @@ def test_handle_request_event_no_symbols(controller):
|
||||
|
||||
with (
|
||||
patch('src.app_controller.parse_symbols', return_value=[]) as mock_parse,
|
||||
patch('src.ai_client.send_result', return_value=Result(data="mocked response")) as mock_send_result
|
||||
patch('src.ai_client.send', return_value=Result(data="mocked response")) as mock_send
|
||||
):
|
||||
# Execute
|
||||
controller._handle_request_event(event)
|
||||
|
||||
# Verify
|
||||
mock_send_result.assert_called_once()
|
||||
args, kwargs = mock_send_result.call_args
|
||||
mock_send.assert_called_once()
|
||||
args, kwargs = mock_send.call_args
|
||||
sent_prompt = args[1]
|
||||
assert sent_prompt == "Just a normal prompt"
|
||||
|
||||
Reference in New Issue
Block a user