gemini quota exhausted: fixing regressions in test suite
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import pytest
|
||||
from unittest.mock import MagicMock, patch
|
||||
from pathlib import Path
|
||||
|
||||
# We can safely import gui_2 if we don't instantiate App without mocking its threads
|
||||
from src import gui_2
|
||||
from src.gui_2 import App
|
||||
|
||||
@pytest.fixture
|
||||
@@ -60,8 +59,8 @@ def test_log_management_init(app_instance: App) -> None:
|
||||
app = app_instance
|
||||
assert "Log Management" in app.show_windows
|
||||
assert app.show_windows["Log Management"] is False
|
||||
assert hasattr(app, "_render_log_management")
|
||||
assert callable(app._render_log_management)
|
||||
assert hasattr(gui_2, "render_log_management")
|
||||
assert callable(gui_2.render_log_management)
|
||||
|
||||
def test_render_log_management_logic(app_instance: App) -> None:
|
||||
app = app_instance
|
||||
@@ -98,7 +97,7 @@ def test_render_log_management_logic(app_instance: App) -> None:
|
||||
mock_imscope.window.return_value = mock_window_cm
|
||||
|
||||
mock_begin_table.return_value = True
|
||||
app._render_log_management()
|
||||
gui_2.render_log_management(app)
|
||||
mock_imscope.window.assert_called_with("Log Management", app.show_windows["Log Management"])
|
||||
mock_begin_table.assert_called()
|
||||
mock_text.assert_any_call("session_1")
|
||||
|
||||
Reference in New Issue
Block a user