aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_hmac.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-11-26 09:31:06 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2013-11-26 09:31:06 -0800
commite60e1d782cb7c1abe68811092f7db342ed14b81f (patch)
tree555ed6a8cecd2759fd22dfbb41f6d61fd46b7788 /tests/hazmat/primitives/test_hmac.py
parent90501724c5b3d73fea5a4242fa09c32277c6c210 (diff)
parent6dc73a9bd475dfb7a3c18c65afaeb644cce3749f (diff)
downloadcryptography-e60e1d782cb7c1abe68811092f7db342ed14b81f.tar.gz
cryptography-e60e1d782cb7c1abe68811092f7db342ed14b81f.tar.bz2
cryptography-e60e1d782cb7c1abe68811092f7db342ed14b81f.zip
Merge pull request #227 from dreid/explicit-backend-in-hazmat
Explicit backend
Diffstat (limited to 'tests/hazmat/primitives/test_hmac.py')
-rw-r--r--tests/hazmat/primitives/test_hmac.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/hazmat/primitives/test_hmac.py b/tests/hazmat/primitives/test_hmac.py
index d17049e3..992bcb1a 100644
--- a/tests/hazmat/primitives/test_hmac.py
+++ b/tests/hazmat/primitives/test_hmac.py
@@ -47,12 +47,12 @@ class TestHMAC(object):
assert h._backend is pretend_backend
assert h.copy()._backend is pretend_backend
- def test_hmac_algorithm_instance(self):
+ def test_hmac_algorithm_instance(self, backend):
with pytest.raises(TypeError):
- hmac.HMAC(b"key", hashes.SHA1)
+ hmac.HMAC(b"key", hashes.SHA1, backend=backend)
- def test_raises_after_finalize(self):
- h = hmac.HMAC(b"key", hashes.SHA1())
+ def test_raises_after_finalize(self, backend):
+ h = hmac.HMAC(b"key", hashes.SHA1(), backend=backend)
h.finalize()
with pytest.raises(AlreadyFinalized):