diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-10-24 07:33:26 -0700 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-10-24 07:33:26 -0700 |
commit | 2f2346344ae5561bc9b106cbb452efeebe3cdc45 (patch) | |
tree | 4babc963e16a02d376075d545150c707e1ab37ff /tests/hazmat/primitives/test_hmac_vectors.py | |
parent | f281daed0e92dd3d00f9aa2fda6ae41e80a0e1fc (diff) | |
parent | 2607ab5b932395de6554f1f4a779481cd4b87619 (diff) | |
download | cryptography-2f2346344ae5561bc9b106cbb452efeebe3cdc45.tar.gz cryptography-2f2346344ae5561bc9b106cbb452efeebe3cdc45.tar.bz2 cryptography-2f2346344ae5561bc9b106cbb452efeebe3cdc45.zip |
Merge pull request #1434 from alex/requires-backend-interface
Change how we represented that a test requires a backend.
Diffstat (limited to 'tests/hazmat/primitives/test_hmac_vectors.py')
-rw-r--r-- | tests/hazmat/primitives/test_hmac_vectors.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/hazmat/primitives/test_hmac_vectors.py b/tests/hazmat/primitives/test_hmac_vectors.py index 2f88fb1d..689628fc 100644 --- a/tests/hazmat/primitives/test_hmac_vectors.py +++ b/tests/hazmat/primitives/test_hmac_vectors.py @@ -15,6 +15,7 @@ from __future__ import absolute_import, division, print_function import pytest +from cryptography.hazmat.backends.interfaces import HMACBackend from cryptography.hazmat.primitives import hashes from .utils import generate_hmac_test @@ -25,7 +26,7 @@ from ...utils import load_hash_vectors only_if=lambda backend: backend.hmac_supported(hashes.MD5()), skip_message="Does not support MD5", ) -@pytest.mark.hmac +@pytest.mark.requires_backend_interface(interface=HMACBackend) class TestHMACMD5(object): test_hmac_md5 = generate_hmac_test( load_hash_vectors, @@ -41,7 +42,7 @@ class TestHMACMD5(object): only_if=lambda backend: backend.hmac_supported(hashes.SHA1()), skip_message="Does not support SHA1", ) -@pytest.mark.hmac +@pytest.mark.requires_backend_interface(interface=HMACBackend) class TestHMACSHA1(object): test_hmac_sha1 = generate_hmac_test( load_hash_vectors, @@ -57,7 +58,7 @@ class TestHMACSHA1(object): only_if=lambda backend: backend.hmac_supported(hashes.SHA224()), skip_message="Does not support SHA224", ) -@pytest.mark.hmac +@pytest.mark.requires_backend_interface(interface=HMACBackend) class TestHMACSHA224(object): test_hmac_sha224 = generate_hmac_test( load_hash_vectors, @@ -73,7 +74,7 @@ class TestHMACSHA224(object): only_if=lambda backend: backend.hmac_supported(hashes.SHA256()), skip_message="Does not support SHA256", ) -@pytest.mark.hmac +@pytest.mark.requires_backend_interface(interface=HMACBackend) class TestHMACSHA256(object): test_hmac_sha256 = generate_hmac_test( load_hash_vectors, @@ -89,7 +90,7 @@ class TestHMACSHA256(object): only_if=lambda backend: backend.hmac_supported(hashes.SHA384()), skip_message="Does not support SHA384", ) -@pytest.mark.hmac +@pytest.mark.requires_backend_interface(interface=HMACBackend) class TestHMACSHA384(object): test_hmac_sha384 = generate_hmac_test( load_hash_vectors, @@ -105,7 +106,7 @@ class TestHMACSHA384(object): only_if=lambda backend: backend.hmac_supported(hashes.SHA512()), skip_message="Does not support SHA512", ) -@pytest.mark.hmac +@pytest.mark.requires_backend_interface(interface=HMACBackend) class TestHMACSHA512(object): test_hmac_sha512 = generate_hmac_test( load_hash_vectors, @@ -121,7 +122,7 @@ class TestHMACSHA512(object): only_if=lambda backend: backend.hmac_supported(hashes.RIPEMD160()), skip_message="Does not support RIPEMD160", ) -@pytest.mark.hmac +@pytest.mark.requires_backend_interface(interface=HMACBackend) class TestHMACRIPEMD160(object): test_hmac_ripemd160 = generate_hmac_test( load_hash_vectors, |