diff options
author | David Reid <dreid@dreid.org> | 2013-10-31 11:20:58 -0700 |
---|---|---|
committer | David Reid <dreid@dreid.org> | 2013-10-31 11:20:58 -0700 |
commit | 6adaf277a100412826af6c8cdd31753832c5609a (patch) | |
tree | 949256dedba6481afbd97c48ebb41be7e52af896 /tests/test_utils.py | |
parent | d5e9c8ddf0e644a740945a29cfa486ba25426300 (diff) | |
parent | b735107f0fe9529cbef070fe50112ac2c9ed9402 (diff) | |
download | cryptography-6adaf277a100412826af6c8cdd31753832c5609a.tar.gz cryptography-6adaf277a100412826af6c8cdd31753832c5609a.tar.bz2 cryptography-6adaf277a100412826af6c8cdd31753832c5609a.zip |
Merge pull request #198 from reaperhulk/vector-movin
Restructure vectors into ciphers/hashes/hmac
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r-- | tests/test_utils.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py index db9ac085..0692c8d1 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -11,6 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import os import textwrap import pytest @@ -133,7 +134,7 @@ def test_load_nist_vectors_decrypt(): def test_load_nist_vectors_from_file_encrypt(): assert load_nist_vectors_from_file( - "AES/KAT/CBCGFSbox128.rsp", + os.path.join("ciphers", "AES", "CBC", "CBCGFSbox128.rsp"), "ENCRYPT" ) == [ { @@ -183,7 +184,7 @@ def test_load_nist_vectors_from_file_encrypt(): def test_load_nist_vectors_from_file_decrypt(): assert load_nist_vectors_from_file( - "AES/KAT/CBCGFSbox128.rsp", + os.path.join("ciphers", "AES", "CBC", "CBCGFSbox128.rsp"), "DECRYPT", ) == [ { @@ -287,7 +288,7 @@ def test_load_cryptrec_vectors_invalid(): def test_load_cryptrec_vectors_from_file_encrypt(): test_set = load_cryptrec_vectors_from_file( - "Camellia/NTT/camellia-128-ecb.txt" + os.path.join("ciphers", "Camellia", "camellia-128-ecb.txt"), ) assert test_set[0] == ( { @@ -351,7 +352,9 @@ def test_load_openssl_vectors(): def test_load_openssl_vectors_from_file(): - test_list = load_openssl_vectors_from_file("Camellia/camellia-ofb.txt") + test_list = load_openssl_vectors_from_file( + os.path.join("ciphers", "Camellia", "camellia-ofb.txt") + ) assert len(test_list) == 24 assert test_list[:4] == [ { @@ -440,7 +443,9 @@ def test_load_hash_vectors_bad_data(): def test_load_hash_vectors_from_file(): - test_list = load_hash_vectors_from_file("RFC/MD5/rfc-1321.txt") + test_list = load_hash_vectors_from_file( + os.path.join("hashes", "MD5", "rfc-1321.txt") + ) assert len(test_list) == 7 assert test_list[:4] == [ (b"", "d41d8cd98f00b204e9800998ecf8427e"), |