diff options
-rw-r--r-- | unit_tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unit_tests.py b/unit_tests.py index b82a479..cd47886 100644 --- a/unit_tests.py +++ b/unit_tests.py @@ -126,8 +126,8 @@ class TestKeys(unittest.TestCase): def assertIsKeypair(self, public_handle, private_handle = None): if isinstance(public_handle, tuple) and private_handle is None: public_handle, private_handle = public_handle - self.assertEqual(p11.C_GetAttributeValue(self.session, public_handle, CKA_CLASS)[CKA_CLASS], CKO_PUBLIC_KEY) - self.assertEqual(p11.C_GetAttributeValue(self.session, private_handle, CKA_CLASS)[CKA_CLASS], CKO_PRIVATE_KEY) + self.assertEqual(p11.C_GetAttributeValue(self.session, public_handle, CKA_CLASS), {CKA_CLASS: CKO_PUBLIC_KEY}) + self.assertEqual(p11.C_GetAttributeValue(self.session, private_handle, CKA_CLASS), {CKA_CLASS: CKO_PRIVATE_KEY}) def test_keygen_token_vs_session(self): self.assertIsKeypair( |