aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_hkdf.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-03-27 11:04:21 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2014-03-27 11:04:21 -0700
commit3d5d6471b10e5f46eb8b40a9a41eb16e657d25b8 (patch)
tree8285f420269fd636e63c9152143750922e48e869 /tests/hazmat/primitives/test_hkdf.py
parent844c14a15884fb60871640576e30a61e6c4c2db1 (diff)
parent85a791f0fa061ec644f5bfca41ee6038eeef38eb (diff)
downloadcryptography-3d5d6471b10e5f46eb8b40a9a41eb16e657d25b8.tar.gz
cryptography-3d5d6471b10e5f46eb8b40a9a41eb16e657d25b8.tar.bz2
cryptography-3d5d6471b10e5f46eb8b40a9a41eb16e657d25b8.zip
Merge pull request #849 from public/changeup-exceptions-2-electric-boogaloo
Use a single tagged exception instead of a hierarchy
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 367addc9..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, UnsupportedInterface
+ 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(UnsupportedInterface):
+ with raises_unsupported_algorithm(_Reasons.BACKEND_MISSING_INTERFACE):
HKDF(hashes.SHA256(), 16, None, None, pretend_backend)