checkpoint post gui2_parity
This commit is contained in:
@@ -9,18 +9,18 @@ from unittest.mock import patch
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||
|
||||
from api_hook_client import ApiHookClient
|
||||
import gui
|
||||
import gui_legacy
|
||||
|
||||
def test_hooks_enabled_via_cli():
|
||||
with patch.object(sys, 'argv', ['gui.py', '--enable-test-hooks']):
|
||||
app = gui.App()
|
||||
with patch.object(sys, 'argv', ['gui_legacy.py', '--enable-test-hooks']):
|
||||
app = gui_legacy.App()
|
||||
assert app.test_hooks_enabled is True
|
||||
|
||||
def test_hooks_disabled_by_default():
|
||||
with patch.object(sys, 'argv', ['gui.py']):
|
||||
with patch.object(sys, 'argv', ['gui_legacy.py']):
|
||||
if 'SLOP_TEST_HOOKS' in os.environ:
|
||||
del os.environ['SLOP_TEST_HOOKS']
|
||||
app = gui.App()
|
||||
app = gui_legacy.App()
|
||||
assert getattr(app, 'test_hooks_enabled', False) is False
|
||||
|
||||
def test_live_hook_server_responses(live_gui):
|
||||
|
||||
Reference in New Issue
Block a user