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/backends/test_commoncrypto.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/backends/test_commoncrypto.py')
-rw-r--r-- | tests/hazmat/backends/test_commoncrypto.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/hazmat/backends/test_commoncrypto.py b/tests/hazmat/backends/test_commoncrypto.py index f7200016..2b730e93 100644 --- a/tests/hazmat/backends/test_commoncrypto.py +++ b/tests/hazmat/backends/test_commoncrypto.py @@ -6,23 +6,16 @@ from __future__ import absolute_import, division, print_function import pytest -from cryptography import utils from cryptography.exceptions import InternalError, _Reasons from cryptography.hazmat.backends import _available_backends -from cryptography.hazmat.primitives.ciphers import Cipher, CipherAlgorithm +from cryptography.hazmat.primitives.ciphers import Cipher from cryptography.hazmat.primitives.ciphers.algorithms import AES from cryptography.hazmat.primitives.ciphers.modes import CBC, GCM +from ...doubles import DummyCipherAlgorithm from ...utils import raises_unsupported_algorithm -@utils.register_interface(CipherAlgorithm) -class DummyCipher(object): - name = "dummy-cipher" - block_size = None - key_size = None - - @pytest.mark.skipif("commoncrypto" not in [i.name for i in _available_backends()], reason="CommonCrypto not available") @@ -55,7 +48,7 @@ class TestCommonCrypto(object): from cryptography.hazmat.backends.commoncrypto.backend import Backend b = Backend() cipher = Cipher( - DummyCipher(), GCM(b"fake_iv_here"), backend=b, + DummyCipherAlgorithm(), GCM(b"fake_iv_here"), backend=b, ) with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_CIPHER): cipher.encryptor() |