This commit is contained in:
2026-03-07 18:31:21 -05:00
parent 39348745d3
commit 896be1eae2
6 changed files with 22 additions and 23 deletions

View File

@@ -36,7 +36,7 @@ def test_handle_generate_send_appends_definitions(controller):
# Mock symbol helpers
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")) as mock_get_def,
patch('src.app_controller.get_symbol_definition', return_value=("src/models.py", "class Track: pass", 42)) as mock_get_def,
patch('threading.Thread') as mock_thread
):
# Execute
@@ -56,7 +56,7 @@ def test_handle_generate_send_appends_definitions(controller):
assert isinstance(event_payload, UserRequestEvent)
# Check if definition was appended
expected_suffix = "\n\n[Definition: Track from src/models.py]\n```python\nclass Track: pass\n```"
expected_suffix = "\n\n[Definition: Track from src/models.py (line 42)]\n```python\nclass Track: pass\n```"
assert event_payload.prompt == "Explain @Track object" + expected_suffix
def test_handle_generate_send_no_symbols(controller):