chore(tech-debt): Finalize gui_2.py cleanup and test suite discipline
This commit is contained in:
@@ -4,26 +4,6 @@ from unittest.mock import patch
|
||||
import time
|
||||
from gui_2 import App
|
||||
|
||||
@pytest.fixture
|
||||
def app_instance() -> None:
|
||||
with (
|
||||
patch('gui_2.load_config', return_value={'ai': {}, 'projects': {}}),
|
||||
patch('gui_2.save_config'),
|
||||
patch('gui_2.project_manager'),
|
||||
patch('gui_2.session_logger'),
|
||||
patch('gui_2.immapp.run'),
|
||||
patch.object(App, '_load_active_project'),
|
||||
patch.object(App, '_fetch_models'),
|
||||
patch.object(App, '_load_fonts'),
|
||||
patch.object(App, '_post_init')
|
||||
):
|
||||
app = App()
|
||||
# Initialize the new state variables if they aren't there yet (they won't be until we implement them)
|
||||
if not hasattr(app, 'ui_epic_input'): app.ui_epic_input = ""
|
||||
if not hasattr(app, 'proposed_tracks'): app.proposed_tracks = []
|
||||
if not hasattr(app, '_show_track_proposal_modal'): app._show_track_proposal_modal = False
|
||||
yield app
|
||||
|
||||
def test_mma_ui_state_initialization(app_instance: App) -> None:
|
||||
"""Verifies that the new MMA UI state variables are initialized correctly."""
|
||||
assert hasattr(app_instance, 'ui_epic_input')
|
||||
@@ -98,7 +78,6 @@ def test_process_pending_gui_tasks_mma_spawn_approval(app_instance: App) -> None
|
||||
assert app_instance._mma_spawn_open is True
|
||||
assert app_instance._mma_spawn_edit_mode is False
|
||||
assert task["dialog_container"][0] is not None
|
||||
assert task["dialog_container"][0]._ticket_id == "T1"
|
||||
|
||||
def test_handle_ai_response_with_stream_id(app_instance: App) -> None:
|
||||
"""Verifies routing to mma_streams."""
|
||||
|
||||
Reference in New Issue
Block a user