aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_ciphers.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hazmat/primitives/test_ciphers.py')
-rw-r--r--tests/hazmat/primitives/test_ciphers.py6
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)