Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

login button #9

Merged
merged 2 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading