refactor(tests): Update test suite and API hooks for AppController architecture
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import pytest
|
||||
from unittest.mock import MagicMock, patch
|
||||
from gui_2 import App
|
||||
from events import UserRequestEvent
|
||||
from src.events import UserRequestEvent
|
||||
|
||||
@pytest.fixture
|
||||
def mock_gui() -> App:
|
||||
with (
|
||||
patch('gui_2.load_config', return_value={
|
||||
patch('src.models.load_config', return_value={
|
||||
"ai": {"provider": "gemini", "model": "model-1"},
|
||||
"projects": {"paths": [], "active": ""},
|
||||
"gui": {"show_windows": {}}
|
||||
@@ -15,8 +15,8 @@ def mock_gui() -> App:
|
||||
patch('gui_2.project_manager.migrate_from_legacy_config', return_value={}),
|
||||
patch('gui_2.project_manager.save_project'),
|
||||
patch('gui_2.session_logger.open_session'),
|
||||
patch('gui_2.App._init_ai_and_hooks'),
|
||||
patch('gui_2.App._fetch_models')
|
||||
patch('src.app_controller.AppController._init_ai_and_hooks'),
|
||||
patch('src.app_controller.AppController._fetch_models')
|
||||
):
|
||||
gui = App()
|
||||
return gui
|
||||
|
||||
Reference in New Issue
Block a user