Skip to content

Commit

Permalink
Change: Remove console output from ssh connection tests
Browse files Browse the repository at this point in the history
Cleanup the console output while running some ssh connection tests.
  • Loading branch information
bjoernricks committed Apr 3, 2023
1 parent 878d4c3 commit d93a3ab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/connections/test_ssh_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,9 @@ def test_connect_no_known_hosts_file(self):
):
ssh_connection.connect()

@patch("builtins.print")
@patch("builtins.input")
def test_connect_adding_and_save_hostkey(self, input_mock):
def test_connect_adding_and_save_hostkey(self, input_mock, _print_mock):
key_io = StringIO(
"""-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
Expand Down Expand Up @@ -189,8 +190,11 @@ def test_connect_adding_and_save_hostkey(self, input_mock):
f"0.0.0.0 {key.get_name()} {key.get_base64()}\n",
)

@patch("builtins.print")
@patch("builtins.input")
def test_connect_adding_and_dont_save_hostkey(self, input_mock):
def test_connect_adding_and_dont_save_hostkey(
self, input_mock, _print_mock
):
key_io = StringIO(
"""-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
Expand Down

0 comments on commit d93a3ab

Please sign in to comment.