diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2016-03-05 13:57:16 -0500 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2016-03-05 13:57:16 -0500 |
commit | 59518a0ccc814fd8ef4d1e6fce6e2858a34a7348 (patch) | |
tree | fcbd8c2dfd7ec6caed3a0668bd7deb6fa27d24e4 /tests/hazmat/primitives/test_hashes.py | |
parent | 6960600f111de1710b01cc4f4ffc6c023d742cd7 (diff) | |
download | cryptography-59518a0ccc814fd8ef4d1e6fce6e2858a34a7348.tar.gz cryptography-59518a0ccc814fd8ef4d1e6fce6e2858a34a7348.tar.bz2 cryptography-59518a0ccc814fd8ef4d1e6fce6e2858a34a7348.zip |
Un-double the test doubles
Diffstat (limited to 'tests/hazmat/primitives/test_hashes.py')
-rw-r--r-- | tests/hazmat/primitives/test_hashes.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/hazmat/primitives/test_hashes.py b/tests/hazmat/primitives/test_hashes.py index 8f7fdb18..a109c219 100644 --- a/tests/hazmat/primitives/test_hashes.py +++ b/tests/hazmat/primitives/test_hashes.py @@ -8,23 +8,16 @@ import pretend import pytest -from cryptography import utils from cryptography.exceptions import AlreadyFinalized, _Reasons from cryptography.hazmat.backends.interfaces import HashBackend from cryptography.hazmat.primitives import hashes from .utils import generate_base_hash_test from ..backends.test_multibackend import DummyHashBackend +from ...doubles import DummyHashAlgorithm from ...utils import raises_unsupported_algorithm -@utils.register_interface(hashes.HashAlgorithm) -class UnsupportedDummyHash(object): - name = "unsupported-dummy-hash" - block_size = None - digest_size = None - - @pytest.mark.requires_backend_interface(interface=HashBackend) class TestHashContext(object): def test_hash_reject_unicode(self, backend): @@ -59,7 +52,7 @@ class TestHashContext(object): def test_unsupported_hash(self, backend): with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_HASH): - hashes.Hash(UnsupportedDummyHash(), backend) + hashes.Hash(DummyHashAlgorithm(), backend) @pytest.mark.supported( |