From 489af7464bd6ef87096e7a772ca33b6d2d0d42c4 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Fri, 17 Jan 2025 16:54:52 -0500 Subject: [PATCH 1/2] login button always triggered --- src/pyoncatqt/login.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/pyoncatqt/login.py b/src/pyoncatqt/login.py index 23de574..a17c0d6 100644 --- a/src/pyoncatqt/login.py +++ b/src/pyoncatqt/login.py @@ -290,9 +290,6 @@ def get_agent_instance(self: QGroupBox) -> pyoncat.ONCat: def connect_to_oncat(self: QGroupBox) -> None: """Connect to OnCat""" - # Check if already connected to OnCat - if self.is_connected: - return self.login_dialog.exec_() self.update_connection_status() From a5ef1f89de316f61bd6021bb1f61c4fc5cda4111 Mon Sep 17 00:00:00 2001 From: "Patrou, Maria" Date: Tue, 21 Jan 2025 09:08:44 -0500 Subject: [PATCH 2/2] test updated for login dialog --- tests/test_login_dialog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_login_dialog.py b/tests/test_login_dialog.py index c27bb6c..9767864 100644 --- a/tests/test_login_dialog.py +++ b/tests/test_login_dialog.py @@ -140,7 +140,8 @@ def test_is_connected() -> None: assert dialog.is_connected dialog.connect_to_oncat() - assert not dialog.login_dialog.exec_.called + # dialog is always called + assert dialog.login_dialog.exec_.called def test_login_dialog_nominal(qtbot: pytest.fixture) -> None: