diff options
-rw-r--r-- | tests/test_crypto.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test_crypto.py b/tests/test_crypto.py index 8ad4d68..e7b13fc 100644 --- a/tests/test_crypto.py +++ b/tests/test_crypto.py @@ -1206,10 +1206,11 @@ class TestPKey: def test_inconsistent_key(self): """ - `PKey.check` returns `Error` if the key is not consistent. + Either `load_privatekey` or `PKey.check` returns `Error` if the key is + not consistent. """ - key = load_privatekey(FILETYPE_PEM, inconsistentPrivateKeyPEM) with pytest.raises(Error): + key = load_privatekey(FILETYPE_PEM, inconsistentPrivateKeyPEM) key.check() def test_check_public_key(self): @@ -1228,10 +1229,11 @@ class TestPKey: def test_check_pr_897(self): """ - `PKey.check` raises `OpenSSL.crypto.Error` if provided with broken key + Either `load_privatekey` or `PKey.check` raises `OpenSSL.crypto.Error` + if provided with broken key """ - pkey = load_privatekey(FILETYPE_PEM, rsa_p_not_prime_pem) with pytest.raises(Error): + pkey = load_privatekey(FILETYPE_PEM, rsa_p_not_prime_pem) pkey.check() |