diff options
Diffstat (limited to 'tests/hazmat')
-rw-r--r-- | tests/hazmat/backends/test_commoncrypto.py | 5 | ||||
-rw-r--r-- | tests/hazmat/bindings/test_commoncrypto.py | 4 | ||||
-rw-r--r-- | tests/hazmat/bindings/test_openssl.py | 3 |
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/hazmat/backends/test_commoncrypto.py b/tests/hazmat/backends/test_commoncrypto.py index e2c6f4a0..28d1a6ca 100644 --- a/tests/hazmat/backends/test_commoncrypto.py +++ b/tests/hazmat/backends/test_commoncrypto.py @@ -17,7 +17,7 @@ import pytest from cryptography import utils from cryptography.exceptions import InternalError, _Reasons -from cryptography.hazmat.bindings.commoncrypto.binding import Binding +from cryptography.hazmat.backends import _available_backends from cryptography.hazmat.primitives import interfaces from cryptography.hazmat.primitives.ciphers.algorithms import AES from cryptography.hazmat.primitives.ciphers.base import Cipher @@ -32,7 +32,8 @@ class DummyCipher(object): block_size = 128 -@pytest.mark.skipif(not Binding.is_available(), +@pytest.mark.skipif("commoncrypto" not in + [i.name for i in _available_backends()], reason="CommonCrypto not available") class TestCommonCrypto(object): def test_supports_cipher(self): diff --git a/tests/hazmat/bindings/test_commoncrypto.py b/tests/hazmat/bindings/test_commoncrypto.py index 0332674b..71c832ef 100644 --- a/tests/hazmat/bindings/test_commoncrypto.py +++ b/tests/hazmat/bindings/test_commoncrypto.py @@ -15,10 +15,12 @@ from __future__ import absolute_import, division, print_function import pytest +from cryptography.hazmat.backends import _available_backends from cryptography.hazmat.bindings.commoncrypto.binding import Binding -@pytest.mark.skipif(not Binding.is_available(), +@pytest.mark.skipif("commoncrypto" not in + [i.name for i in _available_backends()], reason="CommonCrypto not available") class TestCommonCrypto(object): def test_binding_loads(self): diff --git a/tests/hazmat/bindings/test_openssl.py b/tests/hazmat/bindings/test_openssl.py index d22c4fd2..ca6e9ab0 100644 --- a/tests/hazmat/bindings/test_openssl.py +++ b/tests/hazmat/bindings/test_openssl.py @@ -27,9 +27,6 @@ class TestOpenSSL(object): assert binding.lib assert binding.ffi - def test_is_available(self): - assert Binding.is_available() is True - def test_crypto_lock_init(self): b = Binding() b.init_static_locks() |