aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-03-04 15:01:49 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2014-03-04 15:01:49 -0800
commitaee8b1aee873f125ba6fad172c2fcbe205fe8fe4 (patch)
treeff081c202e462958766a6d8803d5422c28b552cb
parent8566cac67b57d93d822bdfa73345a1f679d30701 (diff)
parent6e6a6ff5ae12a9dd47a806dd0929fb445d7e01ac (diff)
downloadcryptography-aee8b1aee873f125ba6fad172c2fcbe205fe8fe4.tar.gz
cryptography-aee8b1aee873f125ba6fad172c2fcbe205fe8fe4.tar.bz2
cryptography-aee8b1aee873f125ba6fad172c2fcbe205fe8fe4.zip
Merge pull request #683 from reaperhulk/pep8-naming
More Automated Checks (pep8-naming)
-rw-r--r--dev-requirements.txt1
-rw-r--r--tests/hazmat/primitives/test_3des.py6
-rw-r--r--tests/hazmat/primitives/test_aes.py12
-rw-r--r--tests/hazmat/primitives/test_blowfish.py8
-rw-r--r--tests/hazmat/primitives/test_camellia.py8
-rw-r--r--tests/hazmat/primitives/test_cast5.py10
-rw-r--r--tests/hazmat/primitives/test_hmac_vectors.py14
-rw-r--r--tests/hazmat/primitives/test_pbkdf2hmac_vectors.py2
-rw-r--r--tox.ini2
9 files changed, 32 insertions, 31 deletions
diff --git a/dev-requirements.txt b/dev-requirements.txt
index 72463cc7..38b20fa4 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -2,6 +2,7 @@ coverage
flake8
invoke
iso8601
+pep8-naming
pretend
pytest
requests
diff --git a/tests/hazmat/primitives/test_3des.py b/tests/hazmat/primitives/test_3des.py
index 581c47eb..a4d696c9 100644
--- a/tests/hazmat/primitives/test_3des.py
+++ b/tests/hazmat/primitives/test_3des.py
@@ -35,7 +35,7 @@ from ...utils import load_nist_vectors
skip_message="Does not support TripleDES CBC",
)
@pytest.mark.cipher
-class TestTripleDES_CBC(object):
+class TestTripleDESModeCBC(object):
test_KAT = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "3DES", "CBC"),
@@ -72,7 +72,7 @@ class TestTripleDES_CBC(object):
skip_message="Does not support TripleDES OFB",
)
@pytest.mark.cipher
-class TestTripleDES_OFB(object):
+class TestTripleDESModeOFB(object):
test_KAT = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "3DES", "OFB"),
@@ -109,7 +109,7 @@ class TestTripleDES_OFB(object):
skip_message="Does not support TripleDES CFB",
)
@pytest.mark.cipher
-class TestTripleDES_CFB(object):
+class TestTripleDESModeCFB(object):
test_KAT = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "3DES", "CFB"),
diff --git a/tests/hazmat/primitives/test_aes.py b/tests/hazmat/primitives/test_aes.py
index 157d3536..ad3626af 100644
--- a/tests/hazmat/primitives/test_aes.py
+++ b/tests/hazmat/primitives/test_aes.py
@@ -31,7 +31,7 @@ from ...utils import load_nist_vectors
skip_message="Does not support AES CBC",
)
@pytest.mark.cipher
-class TestAES_CBC(object):
+class TestAESModeCBC(object):
test_CBC = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "AES", "CBC"),
@@ -64,7 +64,7 @@ class TestAES_CBC(object):
skip_message="Does not support AES ECB",
)
@pytest.mark.cipher
-class TestAES_ECB(object):
+class TestAESModeECB(object):
test_ECB = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "AES", "ECB"),
@@ -97,7 +97,7 @@ class TestAES_ECB(object):
skip_message="Does not support AES OFB",
)
@pytest.mark.cipher
-class TestAES_OFB(object):
+class TestAESModeOFB(object):
test_OFB = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "AES", "OFB"),
@@ -130,7 +130,7 @@ class TestAES_OFB(object):
skip_message="Does not support AES CFB",
)
@pytest.mark.cipher
-class TestAES_CFB(object):
+class TestAESModeCFB(object):
test_CFB = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "AES", "CFB"),
@@ -163,7 +163,7 @@ class TestAES_CFB(object):
skip_message="Does not support AES CTR",
)
@pytest.mark.cipher
-class TestAES_CTR(object):
+class TestAESModeCTR(object):
test_CTR = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "AES", "CTR"),
@@ -180,7 +180,7 @@ class TestAES_CTR(object):
skip_message="Does not support AES GCM",
)
@pytest.mark.cipher
-class TestAES_GCM(object):
+class TestAESModeGCM(object):
test_GCM = generate_aead_test(
load_nist_vectors,
os.path.join("ciphers", "AES", "GCM"),
diff --git a/tests/hazmat/primitives/test_blowfish.py b/tests/hazmat/primitives/test_blowfish.py
index 18512a6e..2801f430 100644
--- a/tests/hazmat/primitives/test_blowfish.py
+++ b/tests/hazmat/primitives/test_blowfish.py
@@ -31,7 +31,7 @@ from ...utils import load_nist_vectors
skip_message="Does not support Blowfish ECB",
)
@pytest.mark.cipher
-class TestBlowfish_ECB(object):
+class TestBlowfishModeECB(object):
test_ECB = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "Blowfish"),
@@ -48,7 +48,7 @@ class TestBlowfish_ECB(object):
skip_message="Does not support Blowfish CBC",
)
@pytest.mark.cipher
-class TestBlowfish_CBC(object):
+class TestBlowfishModeCBC(object):
test_CBC = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "Blowfish"),
@@ -65,7 +65,7 @@ class TestBlowfish_CBC(object):
skip_message="Does not support Blowfish OFB",
)
@pytest.mark.cipher
-class TestBlowfish_OFB(object):
+class TestBlowfishModeOFB(object):
test_OFB = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "Blowfish"),
@@ -82,7 +82,7 @@ class TestBlowfish_OFB(object):
skip_message="Does not support Blowfish CFB",
)
@pytest.mark.cipher
-class TestBlowfish_CFB(object):
+class TestBlowfishModeCFB(object):
test_CFB = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "Blowfish"),
diff --git a/tests/hazmat/primitives/test_camellia.py b/tests/hazmat/primitives/test_camellia.py
index 4b3a67c5..25bd0ff9 100644
--- a/tests/hazmat/primitives/test_camellia.py
+++ b/tests/hazmat/primitives/test_camellia.py
@@ -33,7 +33,7 @@ from ...utils import (
skip_message="Does not support Camellia ECB",
)
@pytest.mark.cipher
-class TestCamellia_ECB(object):
+class TestCamelliaModeECB(object):
test_ECB = generate_encrypt_test(
load_cryptrec_vectors,
os.path.join("ciphers", "Camellia"),
@@ -54,7 +54,7 @@ class TestCamellia_ECB(object):
skip_message="Does not support Camellia CBC",
)
@pytest.mark.cipher
-class TestCamellia_CBC(object):
+class TestCamelliaModeCBC(object):
test_CBC = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "Camellia"),
@@ -71,7 +71,7 @@ class TestCamellia_CBC(object):
skip_message="Does not support Camellia OFB",
)
@pytest.mark.cipher
-class TestCamellia_OFB(object):
+class TestCamelliaModeOFB(object):
test_OFB = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "Camellia"),
@@ -88,7 +88,7 @@ class TestCamellia_OFB(object):
skip_message="Does not support Camellia CFB",
)
@pytest.mark.cipher
-class TestCamellia_CFB(object):
+class TestCamelliaModeCFB(object):
test_CFB = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "Camellia"),
diff --git a/tests/hazmat/primitives/test_cast5.py b/tests/hazmat/primitives/test_cast5.py
index 21119286..60228299 100644
--- a/tests/hazmat/primitives/test_cast5.py
+++ b/tests/hazmat/primitives/test_cast5.py
@@ -31,7 +31,7 @@ from ...utils import load_nist_vectors
skip_message="Does not support CAST5 ECB",
)
@pytest.mark.cipher
-class TestCAST5_ECB(object):
+class TestCAST5ModeECB(object):
test_ECB = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "CAST5"),
@@ -48,7 +48,7 @@ class TestCAST5_ECB(object):
skip_message="Does not support CAST5 CBC",
)
@pytest.mark.cipher
-class TestCAST5_CBC(object):
+class TestCAST5ModeCBC(object):
test_CBC = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "CAST5"),
@@ -65,7 +65,7 @@ class TestCAST5_CBC(object):
skip_message="Does not support CAST5 OFB",
)
@pytest.mark.cipher
-class TestCAST5_OFB(object):
+class TestCAST5ModeOFB(object):
test_OFB = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "CAST5"),
@@ -82,7 +82,7 @@ class TestCAST5_OFB(object):
skip_message="Does not support CAST5 CFB",
)
@pytest.mark.cipher
-class TestCAST5_CFB(object):
+class TestCAST5ModeCFB(object):
test_CFB = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "CAST5"),
@@ -99,7 +99,7 @@ class TestCAST5_CFB(object):
skip_message="Does not support CAST5 CTR",
)
@pytest.mark.cipher
-class TestCAST5_CTR(object):
+class TestCAST5ModeCTR(object):
test_CTR = generate_encrypt_test(
load_nist_vectors,
os.path.join("ciphers", "CAST5"),
diff --git a/tests/hazmat/primitives/test_hmac_vectors.py b/tests/hazmat/primitives/test_hmac_vectors.py
index 0792080b..2f88fb1d 100644
--- a/tests/hazmat/primitives/test_hmac_vectors.py
+++ b/tests/hazmat/primitives/test_hmac_vectors.py
@@ -26,7 +26,7 @@ from ...utils import load_hash_vectors
skip_message="Does not support MD5",
)
@pytest.mark.hmac
-class TestHMAC_MD5(object):
+class TestHMACMD5(object):
test_hmac_md5 = generate_hmac_test(
load_hash_vectors,
"HMAC",
@@ -42,7 +42,7 @@ class TestHMAC_MD5(object):
skip_message="Does not support SHA1",
)
@pytest.mark.hmac
-class TestHMAC_SHA1(object):
+class TestHMACSHA1(object):
test_hmac_sha1 = generate_hmac_test(
load_hash_vectors,
"HMAC",
@@ -58,7 +58,7 @@ class TestHMAC_SHA1(object):
skip_message="Does not support SHA224",
)
@pytest.mark.hmac
-class TestHMAC_SHA224(object):
+class TestHMACSHA224(object):
test_hmac_sha224 = generate_hmac_test(
load_hash_vectors,
"HMAC",
@@ -74,7 +74,7 @@ class TestHMAC_SHA224(object):
skip_message="Does not support SHA256",
)
@pytest.mark.hmac
-class TestHMAC_SHA256(object):
+class TestHMACSHA256(object):
test_hmac_sha256 = generate_hmac_test(
load_hash_vectors,
"HMAC",
@@ -90,7 +90,7 @@ class TestHMAC_SHA256(object):
skip_message="Does not support SHA384",
)
@pytest.mark.hmac
-class TestHMAC_SHA384(object):
+class TestHMACSHA384(object):
test_hmac_sha384 = generate_hmac_test(
load_hash_vectors,
"HMAC",
@@ -106,7 +106,7 @@ class TestHMAC_SHA384(object):
skip_message="Does not support SHA512",
)
@pytest.mark.hmac
-class TestHMAC_SHA512(object):
+class TestHMACSHA512(object):
test_hmac_sha512 = generate_hmac_test(
load_hash_vectors,
"HMAC",
@@ -122,7 +122,7 @@ class TestHMAC_SHA512(object):
skip_message="Does not support RIPEMD160",
)
@pytest.mark.hmac
-class TestHMAC_RIPEMD160(object):
+class TestHMACRIPEMD160(object):
test_hmac_ripemd160 = generate_hmac_test(
load_hash_vectors,
"HMAC",
diff --git a/tests/hazmat/primitives/test_pbkdf2hmac_vectors.py b/tests/hazmat/primitives/test_pbkdf2hmac_vectors.py
index cbd4cc9d..149387be 100644
--- a/tests/hazmat/primitives/test_pbkdf2hmac_vectors.py
+++ b/tests/hazmat/primitives/test_pbkdf2hmac_vectors.py
@@ -26,7 +26,7 @@ from ...utils import load_nist_vectors
skip_message="Does not support SHA1 for PBKDF2HMAC",
)
@pytest.mark.pbkdf2hmac
-class TestPBKDF2HMAC_SHA1(object):
+class TestPBKDF2HMACSHA1(object):
test_pbkdf2_sha1 = generate_pbkdf2_test(
load_nist_vectors,
"KDF",
diff --git a/tox.ini b/tox.ini
index 8f01bf2e..b309f3c0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -47,4 +47,4 @@ commands = flake8 .
[flake8]
exclude = .tox,*.egg
-select = E,W,F
+select = E,W,F,N