diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-10-28 08:30:16 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-10-28 08:30:16 -0700 |
commit | 4583ffda28b816359f4351cfe7918b2353cf947e (patch) | |
tree | 69394e196b8688d8b3ca5bbe142f433461bb332a /tests/hazmat/primitives/test_hashes.py | |
parent | c63c31e1138e8f0900dd7c5d38320e31532c99b5 (diff) | |
download | cryptography-4583ffda28b816359f4351cfe7918b2353cf947e.tar.gz cryptography-4583ffda28b816359f4351cfe7918b2353cf947e.tar.bz2 cryptography-4583ffda28b816359f4351cfe7918b2353cf947e.zip |
sanitize the tests
Diffstat (limited to 'tests/hazmat/primitives/test_hashes.py')
-rw-r--r-- | tests/hazmat/primitives/test_hashes.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/hazmat/primitives/test_hashes.py b/tests/hazmat/primitives/test_hashes.py index 4345a7f4..053a1a46 100644 --- a/tests/hazmat/primitives/test_hashes.py +++ b/tests/hazmat/primitives/test_hashes.py @@ -20,14 +20,12 @@ import pytest import six from cryptography import utils -from cryptography.exceptions import ( - AlreadyFinalized, _Reasons -) -from cryptography.hazmat.backends import default_backend +from cryptography.exceptions import AlreadyFinalized, _Reasons from cryptography.hazmat.backends.interfaces import HashBackend from cryptography.hazmat.primitives import hashes, interfaces from .utils import generate_base_hash_test +from ..backends.test_multibackend import DummyHashBackend from ...utils import raises_unsupported_algorithm @@ -46,7 +44,7 @@ class TestHashContext(object): m.update(six.u("\u00FC")) def test_copy_backend_object(self): - backend = default_backend() + backend = DummyHashBackend([hashes.SHA1]) copied_ctx = pretend.stub() pretend_ctx = pretend.stub(copy=lambda: copied_ctx) h = hashes.Hash(hashes.SHA1(), backend=backend, ctx=pretend_ctx) |