diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-12 14:22:45 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-12 14:22:45 -0800 |
commit | 906e195b2ea255d0e8153c25d273c918ea313ce3 (patch) | |
tree | d9f05ac045d0de3247fc35ea2b88dcbf3c4d71e6 /tests/hazmat | |
parent | 89c63888e652dd54afd9b2efaa98b35cb3028a8e (diff) | |
parent | ad3102ad806225448bf7274a2c5893cc74eda98e (diff) | |
download | cryptography-906e195b2ea255d0e8153c25d273c918ea313ce3.tar.gz cryptography-906e195b2ea255d0e8153c25d273c918ea313ce3.tar.bz2 cryptography-906e195b2ea255d0e8153c25d273c918ea313ce3.zip |
Merge pull request #248 from dreid/hash-context-from-backend
Get a HashContext from the backend like we do a CipherContext
Diffstat (limited to 'tests/hazmat')
-rw-r--r-- | tests/hazmat/primitives/test_hashes.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/hazmat/primitives/test_hashes.py b/tests/hazmat/primitives/test_hashes.py index 07ab2489..6cdb0a07 100644 --- a/tests/hazmat/primitives/test_hashes.py +++ b/tests/hazmat/primitives/test_hashes.py @@ -32,9 +32,9 @@ class TestHashContext(object): m.update(six.u("\u00FC")) def test_copy_backend_object(self): - pretend_hashes = pretend.stub(copy_ctx=lambda a: "copiedctx") - pretend_backend = pretend.stub(hashes=pretend_hashes) - pretend_ctx = pretend.stub() + pretend_backend = pretend.stub() + copied_ctx = pretend.stub() + pretend_ctx = pretend.stub(copy=lambda: copied_ctx) h = hashes.Hash(hashes.SHA1(), backend=pretend_backend, ctx=pretend_ctx) assert h._backend is pretend_backend |