From 7aab8b4ae4f5ab1710a985551c4105d608f5b852 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 23 Oct 2014 11:01:25 -0700 Subject: Change how we represented that a test requires a backend. This way is more extensible and requires less maintaince --- tests/test_utils.py | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'tests/test_utils.py') diff --git a/tests/test_utils.py b/tests/test_utils.py index da3b1a2a..6c8d088b 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -27,12 +27,12 @@ from cryptography.exceptions import UnsupportedAlgorithm, _Reasons import cryptography_vectors from .utils import ( - check_backend_support, check_for_iface, der_encode_dsa_signature, - load_cryptrec_vectors, load_fips_dsa_key_pair_vectors, - load_fips_dsa_sig_vectors, load_fips_ecdsa_key_pair_vectors, - load_fips_ecdsa_signing_vectors, load_hash_vectors, load_kasvs_dh_vectors, - load_nist_vectors, load_pkcs1_vectors, load_rsa_nist_vectors, - load_vectors_from_file, raises_unsupported_algorithm, select_backends + check_backend_support, der_encode_dsa_signature, load_cryptrec_vectors, + load_fips_dsa_key_pair_vectors, load_fips_dsa_sig_vectors, + load_fips_ecdsa_key_pair_vectors, load_fips_ecdsa_signing_vectors, + load_hash_vectors, load_kasvs_dh_vectors, load_nist_vectors, + load_pkcs1_vectors, load_rsa_nist_vectors, load_vectors_from_file, + raises_unsupported_algorithm, select_backends ) @@ -82,19 +82,6 @@ def test_select_two_backends(): assert selected_backends == [b1, b2] -def test_check_for_iface(): - item = pretend.stub(keywords=["fake_name"], funcargs={"backend": True}) - with pytest.raises(pytest.skip.Exception) as exc_info: - check_for_iface("fake_name", FakeInterface, item) - assert exc_info.value.args[0] == "True backend does not support fake_name" - - item = pretend.stub( - keywords=["fake_name"], - funcargs={"backend": FakeInterface()} - ) - check_for_iface("fake_name", FakeInterface, item) - - def test_check_backend_support_skip(): supported = pretend.stub( kwargs={"only_if": lambda backend: False, "skip_message": "Nope"} -- cgit v1.2.3