summaryrefslogtreecommitdiff
path: root/tests/test_crypto.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_crypto.py')
-rw-r--r--tests/test_crypto.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_crypto.py b/tests/test_crypto.py
index 6b55702..8d644de 100644
--- a/tests/test_crypto.py
+++ b/tests/test_crypto.py
@@ -2595,9 +2595,10 @@ class FunctionTests(TestCase):
:py:obj:`load_privatekey` raises :py:obj:`OpenSSL.crypto.Error` when it
is passed an encrypted PEM and an incorrect passphrase.
"""
- self.assertRaises(
+ exc = self.assertRaises(
Error,
load_privatekey, FILETYPE_PEM, encryptedPrivateKeyPEM, b"quack")
+ self.assertNotEqual(exc.args[0], [])
def test_load_privatekey_passphraseWrongType(self):
"""
@@ -2642,10 +2643,11 @@ class FunctionTests(TestCase):
def cb(*a):
called.append(None)
return b"quack"
- self.assertRaises(
+ exc = self.assertRaises(
Error,
load_privatekey, FILETYPE_PEM, encryptedPrivateKeyPEM, cb)
self.assertTrue(called)
+ self.assertNotEqual(exc.args[0], [])
def test_load_privatekey_passphraseCallback(self):
"""