diff options
author | Alex Stapleton <alex@ly.st> | 2014-05-27 12:36:24 +0100 |
---|---|---|
committer | Alex Stapleton <alexs@prol.etari.at> | 2014-05-27 21:50:31 +0100 |
commit | 77a6aabce4b1df0d41be47cd8727bc637c011c47 (patch) | |
tree | 175654fdf85252defc9b2d3273ace6e81719350b /tests/hazmat | |
parent | 70ada5893662cae303f716c2e3cac03989c5e2d9 (diff) | |
download | cryptography-77a6aabce4b1df0d41be47cd8727bc637c011c47.tar.gz cryptography-77a6aabce4b1df0d41be47cd8727bc637c011c47.tar.bz2 cryptography-77a6aabce4b1df0d41be47cd8727bc637c011c47.zip |
Update exception tags
Diffstat (limited to 'tests/hazmat')
-rw-r--r-- | tests/hazmat/primitives/test_serialization.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/hazmat/primitives/test_serialization.py b/tests/hazmat/primitives/test_serialization.py index 39d95199..d0a74912 100644 --- a/tests/hazmat/primitives/test_serialization.py +++ b/tests/hazmat/primitives/test_serialization.py @@ -19,6 +19,7 @@ import textwrap import pytest +from cryptography.exceptions import _Reasons from cryptography.hazmat.primitives.asymmetric import dsa, rsa from cryptography.hazmat.primitives.serialization import ( load_pem_pkcs8_private_key, @@ -243,7 +244,7 @@ class TestTraditionalOpenSSLSerialisation(object): password = b"password" - with raises_unsupported_algorithm(None): + with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_CIPHER): load_pem_traditional_openssl_private_key( key_data, password, backend ) @@ -484,7 +485,7 @@ class TestPKCS8Serialisation(object): ] ) def test_load_bad_oid_key(self, key_file, password, backend): - with raises_unsupported_algorithm(None): + with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM): load_vectors_from_file( os.path.join( "asymmetric", "PKCS8", key_file), @@ -500,7 +501,7 @@ class TestPKCS8Serialisation(object): ] ) def test_load_bad_encryption_oid_key(self, key_file, password, backend): - with raises_unsupported_algorithm(None): + with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_CIPHER): load_vectors_from_file( os.path.join( "asymmetric", "PKCS8", key_file), |