aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Reid <dreid@dreid.org>2014-02-03 10:49:15 -0800
committerDavid Reid <dreid@dreid.org>2014-02-03 10:49:15 -0800
commit6385561ee16742da28dacd1b4dce27baf7f0bb48 (patch)
tree55f4be8ff6101adc3d61791980105dd18e0a9330 /tests
parentb9fa7712a751c4b54dd4b9ba54552a66cc89a34e (diff)
downloadcryptography-6385561ee16742da28dacd1b4dce27baf7f0bb48.tar.gz
cryptography-6385561ee16742da28dacd1b4dce27baf7f0bb48.tar.bz2
cryptography-6385561ee16742da28dacd1b4dce27baf7f0bb48.zip
Import exception classes instead of the exceptions module.
Diffstat (limited to 'tests')
-rw-r--r--tests/hazmat/primitives/test_hkdf.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/hazmat/primitives/test_hkdf.py b/tests/hazmat/primitives/test_hkdf.py
index 66993f0e..0b7fa9b5 100644
--- a/tests/hazmat/primitives/test_hkdf.py
+++ b/tests/hazmat/primitives/test_hkdf.py
@@ -17,7 +17,7 @@ import six
import pytest
-from cryptography import exceptions
+from cryptography.exceptions import AlreadyFinalized,
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.kdf.hkdf import HKDF
@@ -47,7 +47,7 @@ class TestHKDF(object):
hkdf.derive(b"\x01" * 16)
- with pytest.raises(exceptions.AlreadyFinalized):
+ with pytest.raises(AlreadyFinalized):
hkdf.derive(b"\x02" * 16)
hkdf = HKDF(
@@ -60,7 +60,7 @@ class TestHKDF(object):
hkdf.verify(b"\x01" * 16, b"gJ\xfb{\xb1Oi\xc5sMC\xb7\xe4@\xf7u")
- with pytest.raises(exceptions.AlreadyFinalized):
+ with pytest.raises(AlreadyFinalized):
hkdf.verify(b"\x02" * 16, b"gJ\xfb{\xb1Oi\xc5sMC\xb7\xe4@\xf7u")
hkdf = HKDF(
@@ -91,7 +91,7 @@ class TestHKDF(object):
backend=backend
)
- with pytest.raises(exceptions.InvalidKey):
+ with pytest.raises(InvalidKey):
hkdf.verify(b"\x02" * 16, b"gJ\xfb{\xb1Oi\xc5sMC\xb7\xe4@\xf7u")
def test_unicode_typeerror(self, backend):