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.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/hazmat/primitives/test_hmac.py b/tests/hazmat/primitives/test_hmac.py
index 622f186a..992bcb1a 100644
--- a/tests/hazmat/primitives/test_hmac.py
+++ b/tests/hazmat/primitives/test_hmac.py
@@ -33,7 +33,7 @@ class TestHMAC(object):
)
def test_hmac_reject_unicode(self, backend):
- h = hmac.HMAC(b"mykey", hashes.SHA1(), backend)
+ h = hmac.HMAC(b"mykey", hashes.SHA1(), backend=backend)
with pytest.raises(TypeError):
h.update(six.u("\u00FC"))
@@ -42,16 +42,17 @@ class TestHMAC(object):
pretend_backend = pretend.stub(hmacs=pretend_hmac)
copied_ctx = pretend.stub()
pretend_ctx = pretend.stub(copy=lambda: copied_ctx)
- h = hmac.HMAC(b"key", hashes.SHA1(), pretend_backend, ctx=pretend_ctx)
+ 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
def test_hmac_algorithm_instance(self, backend):
with pytest.raises(TypeError):
- hmac.HMAC(b"key", hashes.SHA1, backend)
+ hmac.HMAC(b"key", hashes.SHA1, backend=backend)
def test_raises_after_finalize(self, backend):
- h = hmac.HMAC(b"key", hashes.SHA1(), backend)
+ h = hmac.HMAC(b"key", hashes.SHA1(), backend=backend)
h.finalize()
with pytest.raises(AlreadyFinalized):