diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2023-04-27 21:08:30 -0400 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2023-05-05 12:27:20 -0400 |
commit | 45621fe96644e4e15b421ef665be841ab324564e (patch) | |
tree | d48fb4fb93b74013d5695eb591f27f13484c8f66 /tests/test_client.py | |
parent | 162213fa1a4551bd955134c97ca5276a5f29e907 (diff) |
Enhance PKey.from_path and test it better
Diffstat (limited to 'tests/test_client.py')
-rw-r--r-- | tests/test_client.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/test_client.py b/tests/test_client.py index 564cda00..ea7396d9 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -194,9 +194,7 @@ class ClientTest(unittest.TestCase): run_kwargs[key] = kwargs.pop(key, None) # Server setup threading.Thread(target=self._run, kwargs=run_kwargs).start() - host_key = paramiko.RSAKey.from_private_key_file( - _support("rsa.key") - ) + host_key = paramiko.RSAKey.from_private_key_file(_support("rsa.key")) public_host_key = paramiko.RSAKey(data=host_key.asbytes()) # Client setup @@ -415,9 +413,7 @@ class SSHClientTest(ClientTest): """ warnings.filterwarnings("ignore", "tempnam.*") - host_key = paramiko.RSAKey.from_private_key_file( - _support("rsa.key") - ) + host_key = paramiko.RSAKey.from_private_key_file(_support("rsa.key")) public_host_key = paramiko.RSAKey(data=host_key.asbytes()) fd, localname = mkstemp() os.close(fd) @@ -517,9 +513,7 @@ class SSHClientTest(ClientTest): """ # Start the thread with a 1 second wait. threading.Thread(target=self._run, kwargs={"delay": 1}).start() - host_key = paramiko.RSAKey.from_private_key_file( - _support("rsa.key") - ) + host_key = paramiko.RSAKey.from_private_key_file(_support("rsa.key")) public_host_key = paramiko.RSAKey(data=host_key.asbytes()) self.tc = SSHClient() |