From 199dc276cd1b45a799b511090b37237df49d68a3 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 23 Feb 2015 20:45:21 -0600 Subject: address review comments --- tests/hazmat/primitives/test_serialization.py | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'tests/hazmat/primitives/test_serialization.py') diff --git a/tests/hazmat/primitives/test_serialization.py b/tests/hazmat/primitives/test_serialization.py index 2a5fb21d..fc8f8664 100644 --- a/tests/hazmat/primitives/test_serialization.py +++ b/tests/hazmat/primitives/test_serialization.py @@ -18,9 +18,8 @@ from cryptography.hazmat.backends.interfaces import ( ) from cryptography.hazmat.primitives.asymmetric import dsa, ec, rsa from cryptography.hazmat.primitives.serialization import ( - BestAvailable, Encoding, PKCS8, TraditionalOpenSSL, load_der_private_key, - load_der_public_key, load_pem_private_key, load_pem_public_key, - load_ssh_public_key + BestAvailableEncryption, load_der_private_key, load_der_public_key, + load_pem_private_key, load_pem_public_key, load_ssh_public_key ) @@ -1162,25 +1161,11 @@ class TestECDSASSHSerialization(object): load_ssh_public_key(ssh_key, backend) -@pytest.mark.parametrize( - "serializer", - [PKCS8, TraditionalOpenSSL] -) -class TestSerializers(object): - def test_invalid_encoding(self, serializer): - with pytest.raises(TypeError): - serializer("thing") - - def test_valid_params(self, serializer): - fmt = serializer(Encoding.PEM) - assert isinstance(fmt, (PKCS8, TraditionalOpenSSL)) - - class TestKeySerializationEncryptionTypes(object): def test_non_bytes_password(self): with pytest.raises(ValueError): - BestAvailable(object()) + BestAvailableEncryption(object()) def test_encryption_with_zero_length_password(self): with pytest.raises(ValueError): - BestAvailable(b"") + BestAvailableEncryption(b"") -- cgit v1.2.3