Skip to content

Commit

Permalink
Merge pull request #9 from neutrons/login_button
Browse files Browse the repository at this point in the history
login button
  • Loading branch information
mpatrou authored Jan 24, 2025
2 parents 554fb9b + a5ef1f8 commit bde2dce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/pyoncatqt/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion tests/test_login_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit bde2dce

Please sign in to comment.