aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_hmac.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hazmat/primitives/test_hmac.py')
-rw-r--r--tests/hazmat/primitives/test_hmac.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/hazmat/primitives/test_hmac.py b/tests/hazmat/primitives/test_hmac.py
index 7acb78b7..04913af6 100644
--- a/tests/hazmat/primitives/test_hmac.py
+++ b/tests/hazmat/primitives/test_hmac.py
@@ -33,14 +33,19 @@ class UnsupportedDummyHash(object):
name = "unsupported-dummy-hash"
+@pytest.mark.supported(
+ only_if=lambda backend: backend.hmac_supported(hashes.MD5),
+ skip_message="Does not support MD5",
+)
@pytest.mark.hmac
-class TestHMAC(object):
+class TestHMACCopy(object):
test_copy = generate_base_hmac_test(
hashes.MD5(),
- only_if=lambda backend: backend.hmac_supported(hashes.MD5),
- skip_message="Does not support MD5",
)
+
+@pytest.mark.hmac
+class TestHMAC(object):
def test_hmac_reject_unicode(self, backend):
h = hmac.HMAC(b"mykey", hashes.SHA1(), backend=backend)
with pytest.raises(TypeError):