aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-11-12 14:22:45 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2013-11-12 14:22:45 -0800
commit906e195b2ea255d0e8153c25d273c918ea313ce3 (patch)
treed9f05ac045d0de3247fc35ea2b88dcbf3c4d71e6 /tests
parent89c63888e652dd54afd9b2efaa98b35cb3028a8e (diff)
parentad3102ad806225448bf7274a2c5893cc74eda98e (diff)
downloadcryptography-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')
-rw-r--r--tests/hazmat/primitives/test_hashes.py6
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