aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends/test_openssl.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-03-06 14:22:56 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2014-03-06 14:22:56 -0800
commitc6a6f317fca2aa368943870ecc3854bb53399f06 (patch)
tree6c975bf178f47d504da5edbce3233ca54a89d82d /tests/hazmat/backends/test_openssl.py
parent8b347932fb3612e622d07643af62ed939976b9cb (diff)
downloadcryptography-c6a6f317fca2aa368943870ecc3854bb53399f06.tar.gz
cryptography-c6a6f317fca2aa368943870ecc3854bb53399f06.tar.bz2
cryptography-c6a6f317fca2aa368943870ecc3854bb53399f06.zip
Convert stuff
Diffstat (limited to 'tests/hazmat/backends/test_openssl.py')
-rw-r--r--tests/hazmat/backends/test_openssl.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
index 42c1b395..c6792185 100644
--- a/tests/hazmat/backends/test_openssl.py
+++ b/tests/hazmat/backends/test_openssl.py
@@ -14,7 +14,9 @@
import pytest
from cryptography import utils
-from cryptography.exceptions import UnsupportedAlgorithm, InternalError
+from cryptography.exceptions import (
+ UnsupportedCipher, UnsupportedHash, InternalError
+)
from cryptography.hazmat.backends.openssl.backend import backend, Backend
from cryptography.hazmat.primitives import interfaces, hashes
from cryptography.hazmat.primitives.ciphers import Cipher
@@ -68,7 +70,7 @@ class TestOpenSSL(object):
cipher = Cipher(
DummyCipher(), mode, backend=b,
)
- with pytest.raises(UnsupportedAlgorithm):
+ with pytest.raises(UnsupportedCipher):
cipher.encryptor()
def test_consume_errors(self):
@@ -130,7 +132,7 @@ class TestOpenSSL(object):
def test_derive_pbkdf2_raises_unsupported_on_old_openssl(self):
if backend.pbkdf2_hmac_supported(hashes.SHA256()):
pytest.skip("Requires an older OpenSSL")
- with pytest.raises(UnsupportedAlgorithm):
+ with pytest.raises(UnsupportedHash):
backend.derive_pbkdf2_hmac(hashes.SHA256(), 10, b"", 1000, b"")
# This test is not in the next class because to check if it's really