diff options
Diffstat (limited to 'tests/test_pkey.py')
-rw-r--r-- | tests/test_pkey.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/test_pkey.py b/tests/test_pkey.py index 099fa4b0..95557621 100644 --- a/tests/test_pkey.py +++ b/tests/test_pkey.py @@ -489,9 +489,13 @@ class KeyTest(unittest.TestCase): def test_certificates(self): # PKey.load_certificate - key = RSAKey.from_private_key_file(test_path('test_rsa.key')) + key_path = test_path(os.path.join('cert_support', 'test_rsa.key')) + key = RSAKey.from_private_key_file(key_path) self.assertTrue(key.public_blob is None) - key.load_certificate(test_path('test_rsa.key-cert.pub')) + cert_path = test_path( + os.path.join('cert_support', 'test_rsa.key-cert.pub') + ) + key.load_certificate(cert_path) self.assertTrue(key.public_blob is not None) self.assertEqual(key.public_blob.key_type, 'ssh-rsa-cert-v01@openssh.com') self.assertEqual(key.public_blob.comment, 'test_rsa.key.pub') @@ -507,7 +511,8 @@ class KeyTest(unittest.TestCase): self.assertEqual(msg.get_int64(), 1234) # Prevented from loading certificate that doesn't match - key1 = Ed25519Key.from_private_key_file(test_path('test_ed25519.key')) + key_path = test_path(os.path.join('cert_support', 'test_ed25519.key')) + key1 = Ed25519Key.from_private_key_file(key_path) self.assertRaises( ValueError, key1.load_certificate, |