Private
Public Access
test: more t1.9 minor edits (gcli_adapter patches, comments)
Drop the remaining _update_gcli_adapter monkeypatches from test_ai_loop_regressions_20260614 (3 sites), test_live_gui_integration_v2 (2 sites), and the gemini_cli_adapter comment references in tests/test_ai_client_tool_loop_send_func.py, test_lazymodule_filedialog_fallback.py, and mock_concurrent_mma.py.
This commit is contained in:
@@ -63,12 +63,9 @@ def test_fr1_error_becomes_discussion_entry(mock_app: App, monkeypatch: pytest.M
|
||||
monkeypatch.setattr(ai_client, "set_model_params", lambda *a, **kw: None)
|
||||
monkeypatch.setattr(ai_client, "set_agent_tools", lambda *a, **kw: None)
|
||||
monkeypatch.setattr(ai_client, "set_current_tier", lambda *a, **kw: None)
|
||||
monkeypatch.setattr(ai_client, "get_combined_system_prompt", lambda *a, **kw: "")
|
||||
monkeypatch.setattr(ai_client, "get_current_tier_result", lambda *a, **kw: Result(data=None))
|
||||
monkeypatch.setattr("src.app_controller.AppController._update_gcli_adapter", lambda *a, **kw: None)
|
||||
_drain_queue(app)
|
||||
app.controller._handle_request_event(_make_event())
|
||||
events = _drain_queue(app)
|
||||
</new_content>
|
||||
response_events = [p for n, p in events if n == "response"]
|
||||
assert response_events, "No 'response' event was queued for the error case"
|
||||
payload = response_events[-1]
|
||||
@@ -94,11 +91,11 @@ def test_fr1_success_still_works(mock_app: App, monkeypatch: pytest.MonkeyPatch)
|
||||
monkeypatch.setattr(ai_client, "set_current_tier", lambda *a, **kw: None)
|
||||
monkeypatch.setattr(ai_client, "get_combined_system_prompt", lambda *a, **kw: "")
|
||||
monkeypatch.setattr(ai_client, "get_current_tier_result", lambda *a, **kw: Result(data=None))
|
||||
monkeypatch.setattr("src.app_controller.AppController._update_gcli_adapter", lambda *a, **kw: None)
|
||||
monkeypatch.setattr(ai_client, "get_current_tier_result", lambda *a, **kw: Result(data=None))
|
||||
_drain_queue(app)
|
||||
app.controller._handle_request_event(_make_event())
|
||||
events = _drain_queue(app)
|
||||
response_events = [p for n, p in events if n == "response"]
|
||||
</new_content>
|
||||
assert response_events, "No 'response' event was queued for the success case"
|
||||
payload = response_events[-1]
|
||||
assert payload["status"] == "done", f"Expected status='done', got {payload.get('status')!r}"
|
||||
@@ -119,13 +116,13 @@ def test_fr1_ai_status_updated(mock_app: App, monkeypatch: pytest.MonkeyPatch) -
|
||||
monkeypatch.setattr(ai_client, "set_project_context_marker", lambda *a, **kw: None)
|
||||
monkeypatch.setattr(ai_client, "set_model_params", lambda *a, **kw: None)
|
||||
monkeypatch.setattr(ai_client, "set_agent_tools", lambda *a, **kw: None)
|
||||
monkeypatch.setattr(ai_client, "set_current_tier", lambda *a, **kw: None)
|
||||
monkeypatch.setattr(ai_client, "get_combined_system_prompt", lambda *a, **kw: "")
|
||||
monkeypatch.setattr(ai_client, "get_current_tier_result", lambda *a, **kw: Result(data=None))
|
||||
monkeypatch.setattr("src.app_controller.AppController._update_gcli_adapter", lambda *a, **kw: None)
|
||||
_drain_queue(app)
|
||||
app.controller._handle_request_event(_make_event())
|
||||
status = app.controller.ai_status
|
||||
</new_content>
|
||||
app.controller._handle_request_event(_make_event())
|
||||
status = app.controller.ai_status
|
||||
assert status.startswith("error:"), f"Expected ai_status to start with 'error:', got {status!r}"
|
||||
assert "slow down" in status, f"Expected error message in status, got {status!r}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user