aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Reid <dreid@dreid.org>2013-11-12 11:25:43 -0800
committerDavid Reid <dreid@dreid.org>2013-11-12 11:25:43 -0800
commitee6f8cec48028aeab213404dbce04bb6441a473c (patch)
tree2c0319db853393dfa3bb84101d579185e09e87af /tests
parent1d75bfa060ff55c4e415a8d34f8e55025fed9a86 (diff)
downloadcryptography-ee6f8cec48028aeab213404dbce04bb6441a473c.tar.gz
cryptography-ee6f8cec48028aeab213404dbce04bb6441a473c.tar.bz2
cryptography-ee6f8cec48028aeab213404dbce04bb6441a473c.zip
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