diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2017-05-23 20:31:03 -0700 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-05-23 20:31:03 -0700 |
commit | 6091e11cae1e2ca43709266d0e3ba84ded12ddfc (patch) | |
tree | 070abc134d8afff90dcb4a09ed0c659b999a8a1d /tests/hazmat/primitives/test_ciphers.py | |
parent | 70e8f90b250ba65167943f67cb851495bc7b8add (diff) | |
download | cryptography-6091e11cae1e2ca43709266d0e3ba84ded12ddfc.tar.gz cryptography-6091e11cae1e2ca43709266d0e3ba84ded12ddfc.tar.bz2 cryptography-6091e11cae1e2ca43709266d0e3ba84ded12ddfc.zip |
Bump the minimum PyPy/cffi version and simplify as a result (#3585)
* Bump the minimum PyPy/cffi version and simplify as a result
* unused imports
* grumble, fix
Diffstat (limited to 'tests/hazmat/primitives/test_ciphers.py')
-rw-r--r-- | tests/hazmat/primitives/test_ciphers.py | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/tests/hazmat/primitives/test_ciphers.py b/tests/hazmat/primitives/test_ciphers.py index 60faa0c5..f1718c07 100644 --- a/tests/hazmat/primitives/test_ciphers.py +++ b/tests/hazmat/primitives/test_ciphers.py @@ -7,8 +7,6 @@ from __future__ import absolute_import, division, print_function import binascii import os -import cffi - import pytest from cryptography.exceptions import AlreadyFinalized, _Reasons @@ -141,10 +139,6 @@ def test_invalid_backend(): ciphers.Cipher(AES(b"AAAAAAAAAAAAAAAA"), modes.ECB, pretend_backend) -@pytest.mark.skipif( - cffi.__version_info__ < (1, 7), - reason="cffi version too old" -) @pytest.mark.supported( only_if=lambda backend: backend.cipher_supported( AES(b"\x00" * 16), modes.ECB() @@ -259,45 +253,3 @@ class TestCipherUpdateInto(object): buf = bytearray(5) with pytest.raises(ValueError): encryptor.update_into(b"testing", buf) - - -@pytest.mark.skipif( - cffi.__version_info__ >= (1, 7), - reason="cffi version too new" -) -@pytest.mark.requires_backend_interface(interface=CipherBackend) -class TestCipherUpdateIntoUnsupported(object): - def _too_old(self, mode, backend): - key = b"\x00" * 16 - c = ciphers.Cipher(AES(key), mode, backend) - encryptor = c.encryptor() - buf = bytearray(32) - with pytest.raises(NotImplementedError): - encryptor.update_into(b"\x00" * 16, buf) - - @pytest.mark.supported( - only_if=lambda backend: backend.cipher_supported( - AES(b"\x00" * 16), modes.ECB() - ), - skip_message="Does not support AES ECB", - ) - def test_cffi_too_old_ecb(self, backend): - self._too_old(modes.ECB(), backend) - - @pytest.mark.supported( - only_if=lambda backend: backend.cipher_supported( - AES(b"\x00" * 16), modes.CTR(b"0" * 16) - ), - skip_message="Does not support AES CTR", - ) - def test_cffi_too_old_ctr(self, backend): - self._too_old(modes.CTR(b"0" * 16), backend) - - @pytest.mark.supported( - only_if=lambda backend: backend.cipher_supported( - AES(b"\x00" * 16), modes.GCM(b"0" * 16) - ), - skip_message="Does not support AES GCM", - ) - def test_cffi_too_old_gcm(self, backend): - self._too_old(modes.GCM(b"0" * 16), backend) |