From 6385561ee16742da28dacd1b4dce27baf7f0bb48 Mon Sep 17 00:00:00 2001 From: David Reid Date: Mon, 3 Feb 2014 10:49:15 -0800 Subject: Import exception classes instead of the exceptions module. --- tests/hazmat/primitives/test_hkdf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') 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): -- cgit v1.2.3