aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_utils.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-10-23 11:01:25 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2014-10-23 11:01:25 -0700
commit7aab8b4ae4f5ab1710a985551c4105d608f5b852 (patch)
treefc0e9096c155374259b88f3d3404083f992e8836 /tests/test_utils.py
parenta05af52d1f0fba90030b62185d38523119d68b42 (diff)
downloadcryptography-7aab8b4ae4f5ab1710a985551c4105d608f5b852.tar.gz
cryptography-7aab8b4ae4f5ab1710a985551c4105d608f5b852.tar.bz2
cryptography-7aab8b4ae4f5ab1710a985551c4105d608f5b852.zip
Change how we represented that a test requires a backend.
This way is more extensible and requires less maintaince
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r--tests/test_utils.py25
1 files changed, 6 insertions, 19 deletions
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"}