aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Grebs <cg@webshox.org>2015-09-05 00:08:55 +0200
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-12-27 22:53:23 -0600
commitcb77736766fcd123ba2edd15502127455a4d7d6f (patch)
tree75f5808e64267918cbb95239a77909e03cc253bd
parentb6b810a5114fb0d0cdc0550eceab3734afb4dd41 (diff)
downloadcryptography-cb77736766fcd123ba2edd15502127455a4d7d6f.tar.gz
cryptography-cb77736766fcd123ba2edd15502127455a4d7d6f.tar.bz2
cryptography-cb77736766fcd123ba2edd15502127455a4d7d6f.zip
Fix test again and add pytest.raises statement
-rw-r--r--tests/hazmat/backends/test_openssl.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
index a551b3fc..545ca6c2 100644
--- a/tests/hazmat/backends/test_openssl.py
+++ b/tests/hazmat/backends/test_openssl.py
@@ -468,16 +468,15 @@ class TestOpenSSLRSA(object):
)
)
- decrypted = RSA_KEY_512_ALT.private_key(backend).decrypt(
- ciphertext,
- padding.OAEP(
- mgf=padding.MGF1(algorithm=hashes.SHA1()),
- algorithm=hashes.SHA1(),
- label=None
+ with pytest.raises(ValueError):
+ RSA_KEY_512_ALT.private_key(backend).decrypt(
+ ciphertext,
+ padding.OAEP(
+ mgf=padding.MGF1(algorithm=hashes.SHA1()),
+ algorithm=hashes.SHA1(),
+ label=None
+ )
)
- )
-
- assert decrypted == b'secure data'
@pytest.mark.skipif(