diff options
author | Alex Stapleton <alexs@prol.etari.at> | 2014-03-26 20:26:49 +0000 |
---|---|---|
committer | Alex Stapleton <alexs@prol.etari.at> | 2014-03-27 12:53:55 +0000 |
commit | 4c1401a3745af97fcd398ff5b7f0dcb94f5292a0 (patch) | |
tree | 5e9a953a04398bea99b95e07044eb917c28f56b3 /tests/hazmat/primitives/test_ciphers.py | |
parent | f33ccfcc8e611359a65235d72423fc9c62b438da (diff) | |
download | cryptography-4c1401a3745af97fcd398ff5b7f0dcb94f5292a0.tar.gz cryptography-4c1401a3745af97fcd398ff5b7f0dcb94f5292a0.tar.bz2 cryptography-4c1401a3745af97fcd398ff5b7f0dcb94f5292a0.zip |
Update tests and raise sites
Diffstat (limited to 'tests/hazmat/primitives/test_ciphers.py')
-rw-r--r-- | tests/hazmat/primitives/test_ciphers.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/hazmat/primitives/test_ciphers.py b/tests/hazmat/primitives/test_ciphers.py index 827b3b90..9f8123eb 100644 --- a/tests/hazmat/primitives/test_ciphers.py +++ b/tests/hazmat/primitives/test_ciphers.py @@ -17,13 +17,15 @@ import binascii import pytest -from cryptography.exceptions import UnsupportedAlgorithm +from cryptography.exceptions import _Reasons from cryptography.hazmat.primitives import ciphers from cryptography.hazmat.primitives.ciphers.algorithms import ( AES, ARC4, Blowfish, CAST5, Camellia, IDEA, TripleDES ) from cryptography.hazmat.primitives.ciphers.modes import ECB +from ...utils import raises_unsupported_algorithm + class TestAES(object): @pytest.mark.parametrize(("key", "keysize"), [ @@ -128,5 +130,5 @@ class TestIDEA(object): def test_invalid_backend(): pretend_backend = object() - with pytest.raises(UnsupportedAlgorithm): + with raises_unsupported_algorithm(_Reasons.BACKEND_MISSING_INTERFACE): ciphers.Cipher(AES(b"AAAAAAAAAAAAAAAA"), ECB, pretend_backend) |