diff options
author | Alex Stapleton <alexs@prol.etari.at> | 2014-03-14 20:03:12 +0000 |
---|---|---|
committer | Alex Stapleton <alexs@prol.etari.at> | 2014-03-24 09:46:47 +0000 |
commit | a39a319b096b1b2b1775ae1a91117c19422a6c81 (patch) | |
tree | da7d4dbf73d815f835dcf38a4d62d73b742480d2 /tests/test_fernet.py | |
parent | 68e77c752b94c2531f83589c1bb2060c5ed0d886 (diff) | |
download | cryptography-a39a319b096b1b2b1775ae1a91117c19422a6c81.tar.gz cryptography-a39a319b096b1b2b1775ae1a91117c19422a6c81.tar.bz2 cryptography-a39a319b096b1b2b1775ae1a91117c19422a6c81.zip |
Move cryptography.vectors to cryptography_vectors
All vectors are now stored in the subpackage in the vectors/ folder.
This package is automatically installed by setup.py test and will also
be uploaded with a matching version number by the PyPI upload task.
Diffstat (limited to 'tests/test_fernet.py')
-rw-r--r-- | tests/test_fernet.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/test_fernet.py b/tests/test_fernet.py index 438dc094..34760e3c 100644 --- a/tests/test_fernet.py +++ b/tests/test_fernet.py @@ -28,15 +28,17 @@ from cryptography.fernet import Fernet, InvalidToken from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.ciphers import algorithms, modes +import cryptography_vectors + def json_parametrize(keys, filename): - from cryptography import vectors - vector_file = vectors.open_vector_file('fernet', filename) - data = json.load(vector_file) - return pytest.mark.parametrize(keys, [ - tuple([entry[k] for k in keys]) - for entry in data - ]) + vector_file = cryptography_vectors.open_vector_file('fernet', filename) + with vector_file: + data = json.load(vector_file) + return pytest.mark.parametrize(keys, [ + tuple([entry[k] for k in keys]) + for entry in data + ]) @pytest.mark.cipher |