Private
Public Access
0
0
Files
manual_slop/tests/test_sim_ai_settings.py
T
ed 3b55bdff0e test: switch sim tests from gemini_cli to real minimax/M2.7 provider
Per user direction: use a real provider instead of mocks. The 10 sim
tests that previously set current_provider='gemini_cli' + gcli_path to
tests/mock_gemini_cli.py now set:
  current_provider='minimax'
  current_model='MiniMax-M2.7'

Removed the gcli_path setters (no longer needed). Updated comments
that mentioned 'Use gemini_cli with the mock script'. Updated
test_sim_ai_settings.py provider mock to minimax.

tests/mock_gemini_cli.py + mock_gcli.bat retained as a backstop (no
longer used by any current test). tests/test_cli_tool_bridge*.py
GEMINI_CLI_HOOK_CONTEXT references retained (meta-tooling, separate).
2026-07-05 21:21:25 -04:00

36 lines
1.2 KiB
Python

"""
ANTI-SIMPLIFICATION: These tests verify the Simulation of AI Settings interactions.
They MUST NOT be simplified. They ensure that changes to provider and model
selections are properly simulated and verified via the ApiHookClient.
"""
from unittest.mock import MagicMock, patch
import os
import sys
# Ensure project root is in path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
from simulation.sim_ai_settings import AISettingsSimulation
def test_ai_settings_simulation_run() -> None:
"""
Verifies that AISettingsSimulation correctly cycles through models
to test the settings UI components.
"""
mock_client = MagicMock()
mock_client.wait_for_server.return_value = True
mock_client.get_value.side_effect = lambda key: {
"current_provider": "minimax",
"current_model": "MiniMax-M2.7"
}.get(key)
with patch('simulation.sim_base.WorkflowSimulator') as mock_sim_class:
mock_sim = MagicMock()
mock_sim_class.return_value = mock_sim
sim = AISettingsSimulation(mock_client)
vals = {"current_provider": "minimax", "current_model": "MiniMax-M2.7"}
def side_effect(key):
return vals.get(key)