aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_hkdf.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hazmat/primitives/test_hkdf.py')
-rw-r--r--tests/hazmat/primitives/test_hkdf.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/hazmat/primitives/test_hkdf.py b/tests/hazmat/primitives/test_hkdf.py
index b3d412c5..2e3c0c3d 100644
--- a/tests/hazmat/primitives/test_hkdf.py
+++ b/tests/hazmat/primitives/test_hkdf.py
@@ -18,11 +18,13 @@ import pytest
import six
from cryptography.exceptions import (
- AlreadyFinalized, InvalidKey, UnsupportedAlgorithm
+ AlreadyFinalized, InvalidKey, _Reasons
)
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.kdf.hkdf import HKDF
+from ...utils import raises_unsupported_algorithm
+
@pytest.mark.hmac
class TestHKDF(object):
@@ -152,5 +154,5 @@ class TestHKDF(object):
def test_invalid_backend():
pretend_backend = object()
- with pytest.raises(UnsupportedAlgorithm):
+ with raises_unsupported_algorithm(_Reasons.BACKEND_MISSING_INTERFACE):
HKDF(hashes.SHA256(), 16, None, None, pretend_backend)