fixes
This commit is contained in:
@@ -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"})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user