29 lines
990 B
Python
29 lines
990 B
Python
from unittest.mock import MagicMock, patch
|
|
from src.gui_2 import App
|
|
import sys
|
|
|
|
app = MagicMock()
|
|
app.mma_streams = {}
|
|
app._pending_mma_spawns = [{"ticket_id": "T-001"}]
|
|
app._pending_mma_approvals = []
|
|
app._pending_ask_dialog = False
|
|
app.is_viewing_prior_session = False
|
|
app.mma_status = "idle"
|
|
app.active_track = None
|
|
app.active_tickets = []
|
|
app.mma_tier_usage = {
|
|
"Tier 1": {"input": 0, "output": 0, "model": "gemini-3.1-pro-preview"},
|
|
"Tier 2": {"input": 0, "output": 0, "model": "gemini-3-flash-preview"},
|
|
"Tier 3": {"input": 0, "output": 0, "model": "gemini-2.5-flash-lite"},
|
|
"Tier 4": {"input": 0, "output": 0, "model": "gemini-2.5-flash-lite"},
|
|
}
|
|
app.perf_profiling_enabled = False
|
|
|
|
with patch("src.gui_2.imgui") as mock_imgui:
|
|
App._render_mma_dashboard(app)
|
|
print(f"text_colored called: {mock_imgui.text_colored.called}")
|
|
if not mock_imgui.text_colored.called:
|
|
print("Calls to app methods:")
|
|
for call in app.mock_calls:
|
|
print(call)
|