From 59518a0ccc814fd8ef4d1e6fce6e2858a34a7348 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 5 Mar 2016 13:57:16 -0500 Subject: Un-double the test doubles --- tests/hazmat/primitives/test_x963_vectors.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'tests/hazmat/primitives/test_x963_vectors.py') diff --git a/tests/hazmat/primitives/test_x963_vectors.py b/tests/hazmat/primitives/test_x963_vectors.py index 0332e601..b09d1653 100644 --- a/tests/hazmat/primitives/test_x963_vectors.py +++ b/tests/hazmat/primitives/test_x963_vectors.py @@ -9,22 +9,15 @@ import os import pytest -from cryptography import utils from cryptography.hazmat.backends import default_backend from cryptography.hazmat.backends.interfaces import HashBackend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.kdf.x963kdf import X963KDF +from ...doubles import DummyHashAlgorithm from ...utils import load_vectors_from_file, load_x963_vectors -@utils.register_interface(hashes.HashAlgorithm) -class UnsupportedDummyHash(object): - name = "unsupported-dummy-hash" - block_size = None - digest_size = None - - def _skip_hashfn_unsupported(backend, hashfn): if not backend.hash_supported(hashfn): pytest.skip( @@ -69,4 +62,4 @@ class TestX963(object): xkdf.verify(key, key_data) def test_unsupported_hash(self, backend): - _skip_hashfn_unsupported(backend, UnsupportedDummyHash()) + _skip_hashfn_unsupported(backend, DummyHashAlgorithm()) -- cgit v1.2.3