Skip to content

Commit

Permalink
Clearer ssh exception in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pkittenis committed Apr 1, 2015
1 parent fe91003 commit cb0a90b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/test_pssh_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,16 @@ def test_pssh_client_ssh_exception(self):
server = start_server({ self.fake_cmd : self.fake_resp },
self.listen_socket,
ssh_exception=True)
client = ParallelSSHClient(['127.0.0.1'], port=self.listen_port,
pkey=self.user_key)
client = ParallelSSHClient(['127.0.0.1'],
user='fakey', password='fakey',
port=self.listen_port,
pkey=paramiko.RSAKey.generate(1024),
)
# Handle exception
try:
client.run_command(self.fake_cmd)
raise Exception("Expected SSHException, got none")
except SSHException, ex:
except SSHException:
pass
del client
server.join()
Expand Down

0 comments on commit cb0a90b

Please sign in to comment.