Skip to content
Merged
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: 3 additions & 0 deletions tests/test_connectors/test_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,9 @@ def test_get_sftp_fail(self, fake_sftp_client, fake_ssh_client):
host = inventory.get_host("anotherhost")
host.connect()

# Clear the memoization cache to ensure the exception gets raised
host.connector.get_file_transfer_connection.cache.clear()

fake_sftp_client.from_transport.side_effect = make_raise_exception_function(SSHException)

fake_open = mock.mock_open(read_data="test!")
Expand Down