aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_dsa.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2016-03-05 13:57:16 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2016-03-05 13:57:16 -0500
commit59518a0ccc814fd8ef4d1e6fce6e2858a34a7348 (patch)
treefcbd8c2dfd7ec6caed3a0668bd7deb6fa27d24e4 /tests/hazmat/primitives/test_dsa.py
parent6960600f111de1710b01cc4f4ffc6c023d742cd7 (diff)
downloadcryptography-59518a0ccc814fd8ef4d1e6fce6e2858a34a7348.tar.gz
cryptography-59518a0ccc814fd8ef4d1e6fce6e2858a34a7348.tar.bz2
cryptography-59518a0ccc814fd8ef4d1e6fce6e2858a34a7348.zip
Un-double the test doubles
Diffstat (limited to 'tests/hazmat/primitives/test_dsa.py')
-rw-r--r--tests/hazmat/primitives/test_dsa.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/tests/hazmat/primitives/test_dsa.py b/tests/hazmat/primitives/test_dsa.py
index fcfda614..b02cadc8 100644
--- a/tests/hazmat/primitives/test_dsa.py
+++ b/tests/hazmat/primitives/test_dsa.py
@@ -9,7 +9,6 @@ import os
import pytest
-from cryptography import utils
from cryptography.exceptions import AlreadyFinalized, InvalidSignature
from cryptography.hazmat.backends.interfaces import (
DSABackend, PEMSerializationBackend
@@ -24,24 +23,13 @@ from cryptography.utils import bit_length
from .fixtures_dsa import (
DSA_KEY_1024, DSA_KEY_2048, DSA_KEY_3072
)
+from ...doubles import DummyHashAlgorithm, DummyKeySerializationEncryption
from ...utils import (
load_fips_dsa_key_pair_vectors, load_fips_dsa_sig_vectors,
load_vectors_from_file,
)
-@utils.register_interface(serialization.KeySerializationEncryption)
-class DummyKeyEncryption(object):
- pass
-
-
-@utils.register_interface(hashes.HashAlgorithm)
-class DummyHashAlgorithm(object):
- name = "dummy"
- digest_size = 32
- block_size = 64
-
-
def _skip_if_dsa_not_supported(backend, algorithm, p, q, g):
if (
not backend.dsa_parameters_supported(p, q, g) or
@@ -994,7 +982,7 @@ class TestDSASerialization(object):
key.private_bytes(
serialization.Encoding.PEM,
serialization.PrivateFormat.TraditionalOpenSSL,
- DummyKeyEncryption()
+ DummyKeySerializationEncryption()
)