From 5d3aad0ca44df998bfe37f23d371926ff1a7ffb3 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Apr 2023 16:45:06 -0400 Subject: Add algorithm_name property to PKey --- tests/test_pkey.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/test_pkey.py b/tests/test_pkey.py index 477da0e3..b1b9d51c 100644 --- a/tests/test_pkey.py +++ b/tests/test_pkey.py @@ -653,6 +653,11 @@ class KeyTest(unittest.TestCase): "SHA256:J6VESFdD3xSChn8y9PzWzeF+1tl892mOy2TqkMLO4ow", ] + def test_algorithm_property(self): + # Assumes the RSA, DSS, ECDSA, Ed25519 order seen in 'def keys'. + algorithms = [x.algorithm_name for x, _ in self.keys()] + assert algorithms == ["RSA", "DSS", "ECDSA", "ED25519"] + def test_ed25519_nonbytes_password(self): # https://github.com/paramiko/paramiko/issues/1039 Ed25519Key.from_private_key_file( -- cgit v1.2.3