diff options
author | David Reid <dreid@dreid.org> | 2013-11-12 13:24:56 -0800 |
---|---|---|
committer | David Reid <dreid@dreid.org> | 2013-11-12 13:24:56 -0800 |
commit | 0bcbb41964014926c3c604efff68f2d11b592035 (patch) | |
tree | a7d47beb517277d4480fca85ac79f68060216ca0 /tests/hazmat | |
parent | 5e981fc4bad969750a1a8e109ee6391fb5d4bfbc (diff) | |
download | cryptography-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/hazmat')
-rw-r--r-- | tests/hazmat/primitives/test_hmac.py | 5 |
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 |