aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_hkdf.py
diff options
context:
space:
mode:
authorAlex Stapleton <alexs@prol.etari.at>2014-03-26 20:26:49 +0000
committerAlex Stapleton <alexs@prol.etari.at>2014-03-27 12:53:55 +0000
commit4c1401a3745af97fcd398ff5b7f0dcb94f5292a0 (patch)
tree5e9a953a04398bea99b95e07044eb917c28f56b3 /tests/hazmat/primitives/test_hkdf.py
parentf33ccfcc8e611359a65235d72423fc9c62b438da (diff)
downloadcryptography-4c1401a3745af97fcd398ff5b7f0dcb94f5292a0.tar.gz
cryptography-4c1401a3745af97fcd398ff5b7f0dcb94f5292a0.tar.bz2
cryptography-4c1401a3745af97fcd398ff5b7f0dcb94f5292a0.zip
Update tests and raise sites
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)