diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-01-04 18:13:40 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-01-04 18:13:40 -0600 |
commit | 2dd21fec484c85647d73145bd9957fd5326495c3 (patch) | |
tree | 36ca0d71787af7c8a94d06894ea2f10838b65177 /tests/test_utils.py | |
parent | 3ae13fc662435d69c7d93e937a675059164a495c (diff) | |
download | cryptography-2dd21fec484c85647d73145bd9957fd5326495c3.tar.gz cryptography-2dd21fec484c85647d73145bd9957fd5326495c3.tar.bz2 cryptography-2dd21fec484c85647d73145bd9957fd5326495c3.zip |
remove unneeded mark now that is_available is there
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r-- | tests/test_utils.py | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py index 6f938f58..e3e53d63 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -14,18 +14,14 @@ import os import textwrap -import cffi - import pretend import pytest -from cryptography.hazmat.bindings.utils import binding_available - from .utils import ( load_nist_vectors, load_vectors_from_file, load_cryptrec_vectors, load_openssl_vectors, load_hash_vectors, check_for_iface, - check_backend_support, check_binding_available + check_backend_support ) @@ -33,16 +29,6 @@ class FakeInterface(object): pass -class FakeBinding(object): - @classmethod - def _ensure_ffi_initialized(cls): - raise cffi.VerificationError - - @classmethod - def is_available(cls): - return binding_available(cls._ensure_ffi_initialized) - - def test_check_for_iface(): item = pretend.stub(keywords=["fake_name"], funcargs={"backend": True}) with pytest.raises(pytest.skip.Exception) as exc_info: @@ -86,22 +72,6 @@ def test_check_backend_support_no_backend(): check_backend_support(item) -def test_check_binding_available(): - from cryptography.hazmat.bindings.openssl.binding import Binding - kwargs = pretend.stub(kwargs={"binding": Binding}) - item = pretend.stub(keywords={"binding_available": kwargs}) - assert check_binding_available(item) is None - - -def test_check_binding_unavailable(): - kwargs = pretend.stub(kwargs={"binding": FakeBinding}) - item = pretend.stub(keywords={"binding_available": kwargs}) - with pytest.raises(pytest.skip.Exception) as exc_info: - check_binding_available(item) - assert exc_info.value.args[0] == ("<class 'tests.test_utils.FakeBinding'>" - " is not available") - - def test_load_nist_vectors(): vector_data = textwrap.dedent(""" # CAVS 11.1 |