aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_serialization.py
diff options
context:
space:
mode:
authormichael-hart <michael.hart1994@gmail.com>2014-09-26 01:01:50 +0100
committermichael-hart <michael.hart1994@gmail.com>2014-09-26 18:40:28 +0100
commit0a4c401431f2864b03e6e8baf3c0478bfe74b8b2 (patch)
tree0e98755872bd58838d45996864004f92bc1214a5 /tests/hazmat/primitives/test_serialization.py
parent254811fd619188610298485a66885784944c1de8 (diff)
downloadcryptography-0a4c401431f2864b03e6e8baf3c0478bfe74b8b2.tar.gz
cryptography-0a4c401431f2864b03e6e8baf3c0478bfe74b8b2.tar.bz2
cryptography-0a4c401431f2864b03e6e8baf3c0478bfe74b8b2.zip
Corrected tests
Diffstat (limited to 'tests/hazmat/primitives/test_serialization.py')
-rw-r--r--tests/hazmat/primitives/test_serialization.py27
1 files changed, 9 insertions, 18 deletions
diff --git a/tests/hazmat/primitives/test_serialization.py b/tests/hazmat/primitives/test_serialization.py
index 2ee096be..7cbd3f71 100644
--- a/tests/hazmat/primitives/test_serialization.py
+++ b/tests/hazmat/primitives/test_serialization.py
@@ -88,7 +88,6 @@ class TestPEMSerialization(object):
os.path.join("asymmetric", "PKCS8", "unenc-rsa-pkcs8.pub.pem"),
os.path.join(
"asymmetric", "PEM_Serialization", "rsa_public_key.pem"),
- ),
]
)
def test_load_pem_rsa_public_key(self, key_file, backend):
@@ -105,17 +104,17 @@ class TestPEMSerialization(object):
assert numbers.e == 65537
@pytest.mark.parametrize(
- ("key_file"),
- [
- os.path.join("asymmetric", "PKCS8", "unenc-dsa-pkcs8.pub.pem"),
- os.path.join(
+ ("key_file"),
+ [
+ os.path.join("asymmetric", "PKCS8", "unenc-dsa-pkcs8.pub.pem"),
+ os.path.join(
"asymmetric", "PEM_Serialization",
- "dsa_public_key.pem"
-), ),
- ]
- def test_load_pem_dsa_public_key(self, keyfile, backend):
+ "dsa_public_key.pem"),
+ ]
+ )
+ def test_load_pem_dsa_public_key(self, key_file, backend):
key = load_vectors_from_file(
- keyfile,
+ key_file,
lambda pemfile: load_pem_public_key(
pemfile.read().encode(), backend
)
@@ -123,14 +122,6 @@ class TestPEMSerialization(object):
assert key
assert isinstance(key, interfaces.DSAPublicKey)
- def test_load_pem_ec_public_key(self, backend):
- key = load_vectors_from_file(
- os.path.join("asymmetric", "PEM_Serialization",
- "ec_public_key.pem"),
- lambda pemfile: load_pem_public_key(
- pemfile.read().encode(), backend
- )
- )
@pytest.mark.traditional_openssl_serialization
class TestTraditionalOpenSSLSerialization(object):