From e114b0d3f57842b3ddcf0bcc5d19e9f24399cace Mon Sep 17 00:00:00 2001 From: Michal Kuffa Date: Fri, 28 Jul 2017 14:24:15 +0200 Subject: Add file_obj handling to the Ed25519Key constructor --- tests/test_pkey.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/test_pkey.py') diff --git a/tests/test_pkey.py b/tests/test_pkey.py index 9bb3c44c..89a3f74a 100644 --- a/tests/test_pkey.py +++ b/tests/test_pkey.py @@ -466,6 +466,12 @@ class KeyTest(unittest.TestCase): self.assertTrue(not pub.can_sign()) self.assertEqual(key, pub) + def test_ed25519_load_from_file_obj(self): + with open(test_path('test_ed25519.key')) as pkey_fileobj: + key = Ed25519Key.from_private_key(pkey_fileobj) + self.assertEqual(key, key) + self.assertTrue(key.can_sign()) + def test_keyfile_is_actually_encrypted(self): # Read an existing encrypted private key file_ = test_path('test_rsa_password.key') -- cgit v1.2.3