aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Reid <dreid@dreid.org>2013-11-12 13:24:56 -0800
committerDavid Reid <dreid@dreid.org>2013-11-12 13:24:56 -0800
commit0bcbb41964014926c3c604efff68f2d11b592035 (patch)
treea7d47beb517277d4480fca85ac79f68060216ca0 /tests
parent5e981fc4bad969750a1a8e109ee6391fb5d4bfbc (diff)
downloadcryptography-0bcbb41964014926c3c604efff68f2d11b592035.tar.gz
cryptography-0bcbb41964014926c3c604efff68f2d11b592035.tar.bz2
cryptography-0bcbb41964014926c3c604efff68f2d11b592035.zip
Get a HashContext from the hmac backend like we do a CipherContext
Diffstat (limited to 'tests')
-rw-r--r--tests/hazmat/primitives/test_hmac.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/hazmat/primitives/test_hmac.py b/tests/hazmat/primitives/test_hmac.py
index a44838cf..0f627a10 100644
--- a/tests/hazmat/primitives/test_hmac.py
+++ b/tests/hazmat/primitives/test_hmac.py
@@ -37,9 +37,10 @@ class TestHMAC(object):
h.update(six.u("\u00FC"))
def test_copy_backend_object(self):
- pretend_hmac = pretend.stub(copy_ctx=lambda a: True)
+ pretend_hmac = pretend.stub()
pretend_backend = pretend.stub(hmacs=pretend_hmac)
- pretend_ctx = pretend.stub()
+ copied_ctx = pretend.stub()
+ pretend_ctx = pretend.stub(copy=lambda: copied_ctx)
h = hmac.HMAC(b"key", hashes.SHA1(), backend=pretend_backend,
ctx=pretend_ctx)
assert h._backend is pretend_backend