from src.gui_2 import App

def test_cb_ticket_retry(app_instance: App) -> None:
 ticket_id = "test_ticket_1"
 app_instance.active_tickets = [{"id": ticket_id, "status": "failed"}]
 # Synchronous implementation does not use asyncio.run_coroutine_threadsafe
 app_instance.controller._cb_ticket_retry(ticket_id)
 # Verify status update
 assert app_instance.active_tickets[0]['status'] == 'todo'

def test_cb_ticket_skip(app_instance: App) -> None:
 ticket_id = "test_ticket_2"
 app_instance.active_tickets = [{"id": ticket_id, "status": "todo"}]
 app_instance.controller._cb_ticket_skip(ticket_id)
 # Verify status update
 assert app_instance.active_tickets[0]['status'] == 'skipped'
