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.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/tests/hazmat/primitives/test_hmac.py b/tests/hazmat/primitives/test_hmac.py
index 42726a7c..43909024 100644
--- a/tests/hazmat/primitives/test_hmac.py
+++ b/tests/hazmat/primitives/test_hmac.py
@@ -32,26 +32,15 @@ class TestHMAC(object):
)
def test_hmac_reject_unicode(self, backend):
- h = hmac.HMAC(key=b"mykey", digestmod=hashes.SHA1, backend=backend)
+ h = hmac.HMAC(b"mykey", hashes.SHA1, backend=backend)
with pytest.raises(TypeError):
h.update(six.u("\u00FC"))
- def test_base_hash_hexdigest_string_type(self, backend):
- h = hmac.HMAC(key=b"mykey", digestmod=hashes.SHA1, backend=backend,
- msg=b"")
- assert isinstance(h.hexdigest(), str)
-
- def test_hmac_no_digestmod(self):
- with pytest.raises(TypeError):
- hmac.HMAC(key=b"shortkey")
-
-
-class TestCopyHMAC(object):
def test_copy_backend_object(self):
pretend_hmac = pretend.stub(copy_ctx=lambda a: True)
pretend_backend = pretend.stub(hmacs=pretend_hmac)
pretend_ctx = pretend.stub()
- h = hmac.HMAC(b"key", digestmod=hashes.SHA1, backend=pretend_backend,
+ h = hmac.HMAC(b"key", hashes.SHA1, backend=pretend_backend,
ctx=pretend_ctx)
assert h._backend is pretend_backend
assert h.copy()._backend is pretend_backend