diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2018-09-17 19:18:13 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2018-09-17 19:18:13 -0700 |
commit | 9b9e2bcbc185b5b4557cf7fe5efe22626deee610 (patch) | |
tree | 815fbb0fd9f5dba7308cd146a6c289cc9b39e72d /tests | |
parent | 30d49449e38cb10a254983605d576d48a76a387b (diff) |
s/test_path/_support/g
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_client.py | 4 | ||||
-rw-r--r-- | tests/test_pkey.py | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_client.py b/tests/test_client.py index 3d00aefb..48af2a57 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -272,7 +272,7 @@ class SSHClientTest(unittest.TestCase): # NOTE: only bothered whipping up one cert per overall class/family. for type_ in ('rsa', 'dss', 'ecdsa_256', 'ed25519'): cert_name = 'test_{0}.key-cert.pub'.format(type_) - cert_path = test_path(os.path.join('cert_support', cert_name)) + cert_path = _support(os.path.join('cert_support', cert_name)) self._test_connection( key_filename=cert_path, public_blob=PublicBlob.from_file(cert_path), @@ -287,7 +287,7 @@ class SSHClientTest(unittest.TestCase): # succeeding proving that the overall flow works. for type_ in ('rsa', 'dss', 'ecdsa_256', 'ed25519'): key_name = 'test_{0}.key'.format(type_) - key_path = test_path(os.path.join('cert_support', key_name)) + key_path = _support(os.path.join('cert_support', key_name)) self._test_connection( key_filename=key_path, public_blob=PublicBlob.from_file( diff --git a/tests/test_pkey.py b/tests/test_pkey.py index c805c4bc..2479f273 100644 --- a/tests/test_pkey.py +++ b/tests/test_pkey.py @@ -488,7 +488,7 @@ class KeyTest(unittest.TestCase): # No exception -> it's good. Meh. def test_ed25519_load_from_file_obj(self): - with open(test_path('test_ed25519.key')) as pkey_fileobj: + with open(_support('test_ed25519.key')) as pkey_fileobj: key = Ed25519Key.from_private_key(pkey_fileobj) self.assertEqual(key, key) self.assertTrue(key.can_sign()) @@ -513,10 +513,10 @@ class KeyTest(unittest.TestCase): # test_client.py; this and nearby cert tests are more about the gritty # details. # PKey.load_certificate - key_path = test_path(os.path.join('cert_support', 'test_rsa.key')) + key_path = _support(os.path.join('cert_support', 'test_rsa.key')) key = RSAKey.from_private_key_file(key_path) self.assertTrue(key.public_blob is None) - cert_path = test_path( + cert_path = _support( os.path.join('cert_support', 'test_rsa.key-cert.pub') ) key.load_certificate(cert_path) @@ -535,10 +535,10 @@ class KeyTest(unittest.TestCase): self.assertEqual(msg.get_int64(), 1234) # Prevented from loading certificate that doesn't match - key_path = test_path(os.path.join('cert_support', 'test_ed25519.key')) + key_path = _support(os.path.join('cert_support', 'test_ed25519.key')) key1 = Ed25519Key.from_private_key_file(key_path) self.assertRaises( ValueError, key1.load_certificate, - test_path('test_rsa.key-cert.pub'), + _support('test_rsa.key-cert.pub'), ) |