diff options
author | Michal Kuffa <michal@bynder.com> | 2017-07-28 14:24:15 +0200 |
---|---|---|
committer | Michal Kuffa <michal@bynder.com> | 2017-07-28 14:24:15 +0200 |
commit | e114b0d3f57842b3ddcf0bcc5d19e9f24399cace (patch) | |
tree | b56bc7f8d38f53eae60fec8687202de1e85a8b88 /tests | |
parent | 08f503740182608570ac87661225fe2e11914d8f (diff) |
Add file_obj handling to the Ed25519Key constructor
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_pkey.py | 6 |
1 files changed, 6 insertions, 0 deletions
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') |