diff options
| author | michael-hart <michael.hart1994@gmail.com> | 2014-09-26 01:01:50 +0100 | 
|---|---|---|
| committer | michael-hart <michael.hart1994@gmail.com> | 2014-09-26 18:40:28 +0100 | 
| commit | 0a4c401431f2864b03e6e8baf3c0478bfe74b8b2 (patch) | |
| tree | 0e98755872bd58838d45996864004f92bc1214a5 | |
| parent | 254811fd619188610298485a66885784944c1de8 (diff) | |
| download | cryptography-0a4c401431f2864b03e6e8baf3c0478bfe74b8b2.tar.gz cryptography-0a4c401431f2864b03e6e8baf3c0478bfe74b8b2.tar.bz2 cryptography-0a4c401431f2864b03e6e8baf3c0478bfe74b8b2.zip | |
Corrected tests
| -rw-r--r-- | tests/hazmat/backends/test_multibackend.py | 2 | ||||
| -rw-r--r-- | tests/hazmat/primitives/test_serialization.py | 27 | 
2 files changed, 10 insertions, 19 deletions
| diff --git a/tests/hazmat/backends/test_multibackend.py b/tests/hazmat/backends/test_multibackend.py index e4a05aae..45c12b34 100644 --- a/tests/hazmat/backends/test_multibackend.py +++ b/tests/hazmat/backends/test_multibackend.py @@ -218,7 +218,7 @@ class DummyPEMSerializationBackend(object):          pass      def load_pem_public_key(self, data): -    pass +        pass  class TestMultiBackend(object): 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): | 
