Skip to content

Commit

Permalink
Adjust existing unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
giffels committed May 23, 2024
1 parent 1de0bee commit 6f108fe
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tests/utilities_t/executors_t/test_sshexecutor.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ def test_establish_connection(self):
run_async(self.executor._establish_connection), MockConnection
)

self.mock_asyncssh.connect.assert_called_with(**self.test_asyncssh_params)
self.mock_asyncssh.connect.assert_called_with(
client_factory=None, **self.test_asyncssh_params
)

test_exceptions = [
ConnectionResetError(),
Expand Down Expand Up @@ -163,7 +165,10 @@ async def is_queued(n: int):
def test_run_command(self):
self.assertIsNone(run_async(self.executor.run_command, command="Test").stdout)
self.mock_asyncssh.connect.assert_called_with(
host="test_host", username="test", client_keys=["TestKey"]
client_factory=None,
host="test_host",
username="test",
client_keys=["TestKey"],
)
self.mock_asyncssh.reset_mock()

Expand Down Expand Up @@ -223,5 +228,8 @@ def test_construction_by_yaml(self):
"Test",
)
self.mock_asyncssh.connect.assert_called_with(
host="test_host", username="test", client_keys=["TestKey"]
client_factory=None,
host="test_host",
username="test",
client_keys=["TestKey"],
)

0 comments on commit 6f108fe

Please sign in to comment.