aboutsummaryrefslogtreecommitdiffstats
path: root/tests/primitives/utils.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-10-16 14:16:04 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2013-10-16 14:16:04 -0700
commit016eed1cc1cc26ff404ac31ed3858de362ca37f2 (patch)
treedc7f2ceaa1f2ba58b3313c9f59f2ec1ae08d9b68 /tests/primitives/utils.py
parentbd458ae1e3bdd48f74437216ac467ab2e4d68b13 (diff)
downloadcryptography-016eed1cc1cc26ff404ac31ed3858de362ca37f2.tar.gz
cryptography-016eed1cc1cc26ff404ac31ed3858de362ca37f2.tar.bz2
cryptography-016eed1cc1cc26ff404ac31ed3858de362ca37f2.zip
Ported openssl vector tests
Diffstat (limited to 'tests/primitives/utils.py')
-rw-r--r--tests/primitives/utils.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/primitives/utils.py b/tests/primitives/utils.py
index e35c915a..13bf0d89 100644
--- a/tests/primitives/utils.py
+++ b/tests/primitives/utils.py
@@ -7,18 +7,15 @@ from cryptography.bindings import openssl
from cryptography.primitives.block import BlockCipher
-def generate_encrypt_test(param_loader, cipher_name, vector_type, file_names,
- cipher_factory, mode_factory,
- only_if=lambda api: True):
+def generate_encrypt_test(param_loader, path, file_names, cipher_factory,
+ mode_factory, only_if=lambda api: True):
def test_encryption(self):
for api in [openssl.api]:
if not only_if(api):
yield encrypt_skipped
else:
for file_name in file_names:
- for params in param_loader(
- os.path.join(cipher_name, vector_type, file_name)
- ):
+ for params in param_loader(os.path.join(path, file_name)):
yield encrypt_test, api, cipher_factory, mode_factory, params
return test_encryption