This commit is contained in:
2026-03-12 18:47:17 -04:00
parent 23943443e3
commit 19e7c94c2e
8 changed files with 65 additions and 46 deletions

View File

@@ -58,6 +58,9 @@ def test_gui_updates_on_event(app_instance: App) -> None:
mock_stats = {"percentage": 50.0, "current": 500, "limit": 1000}
app_instance.last_md = "mock_md"
with patch('src.ai_client.get_token_stats', return_value=mock_stats):
# Drain the queue
while not app_instance.event_queue.empty():
app_instance.event_queue.get()
# Simulate receiving an event from the API client thread
app_instance._on_api_event(payload={"text": "test"})