aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-04-29 10:00:24 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2017-04-29 09:00:24 -0500
commit0417d00d9ff1e19bc3ab67d39bdd18e1674768c1 (patch)
tree65757fc8981bf5d81dbe008c944aeed2f6354601 /tests
parentf2b541f16d6b4a4bba56dbb1f04be863ec66a9c6 (diff)
downloadcryptography-0417d00d9ff1e19bc3ab67d39bdd18e1674768c1.tar.gz
cryptography-0417d00d9ff1e19bc3ab67d39bdd18e1674768c1.tar.bz2
cryptography-0417d00d9ff1e19bc3ab67d39bdd18e1674768c1.zip
Don't compare cffi version using strings (#3524)
Diffstat (limited to 'tests')
-rw-r--r--tests/hazmat/primitives/test_block.py3
-rw-r--r--tests/hazmat/primitives/test_ciphers.py5
2 files changed, 3 insertions, 5 deletions
diff --git a/tests/hazmat/primitives/test_block.py b/tests/hazmat/primitives/test_block.py
index 11a70195..4c6ad18b 100644
--- a/tests/hazmat/primitives/test_block.py
+++ b/tests/hazmat/primitives/test_block.py
@@ -17,7 +17,6 @@ from cryptography.hazmat.backends.interfaces import CipherBackend
from cryptography.hazmat.primitives.ciphers import (
Cipher, algorithms, base, modes
)
-from cryptography.utils import _version_check
from .utils import (
generate_aead_exception_test, generate_aead_tag_exception_test
@@ -74,7 +73,7 @@ class TestCipherContext(object):
decryptor.finalize()
@pytest.mark.skipif(
- not _version_check(cffi.__version__, '1.7'),
+ cffi.__version_info__ < (1, 7),
reason="cffi version too old"
)
def test_use_update_into_after_finalize(self, backend):
diff --git a/tests/hazmat/primitives/test_ciphers.py b/tests/hazmat/primitives/test_ciphers.py
index 83952a87..7f51576a 100644
--- a/tests/hazmat/primitives/test_ciphers.py
+++ b/tests/hazmat/primitives/test_ciphers.py
@@ -18,7 +18,6 @@ from cryptography.hazmat.primitives.ciphers import modes
from cryptography.hazmat.primitives.ciphers.algorithms import (
AES, ARC4, Blowfish, CAST5, Camellia, IDEA, SEED, TripleDES
)
-from cryptography.utils import _version_check
from ...utils import (
load_nist_vectors, load_vectors_from_file, raises_unsupported_algorithm
@@ -143,7 +142,7 @@ def test_invalid_backend():
@pytest.mark.skipif(
- not _version_check(cffi.__version__, '1.7'),
+ cffi.__version_info__ < (1, 7),
reason="cffi version too old"
)
@pytest.mark.supported(
@@ -241,7 +240,7 @@ class TestCipherUpdateInto(object):
@pytest.mark.skipif(
- _version_check(cffi.__version__, '1.7'),
+ cffi.__version_info__ >= (1, 7),
reason="cffi version too new"
)
@pytest.mark.requires_backend_interface(interface=CipherBackend)