From f19b6382bc38a5ce91de3746ee3af31e14117684 Mon Sep 17 00:00:00 2001 From: Mike Culbertson Date: Thu, 27 Sep 2018 10:10:04 -0400 Subject: [PATCH] Updated verify tests --- lemur/tests/test_verify.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lemur/tests/test_verify.py b/lemur/tests/test_verify.py index 4a7854b2..0572d0d3 100644 --- a/lemur/tests/test_verify.py +++ b/lemur/tests/test_verify.py @@ -13,8 +13,7 @@ from .vectors import INTERMEDIATE_CERT_STR def test_verify_simple_cert(): """Simple certificate without CRL or OCSP.""" # Verification raises an exception for "unknown" if there are no means to verify it - with pytest.raises(Exception, match="Failed to verify"): - verify_string(INTERMEDIATE_CERT_STR, '') + assert verify_string(INTERMEDIATE_CERT_STR, '') == None def test_verify_crl_unknown_scheme(cert_builder, private_key): @@ -31,7 +30,7 @@ def test_verify_crl_unknown_scheme(cert_builder, private_key): f.write(cert.public_bytes(serialization.Encoding.PEM)) # Must not raise exception - crl_verify(cert_tmp) + crl_verify(cert, cert_tmp) def test_verify_crl_unreachable(cert_builder, private_key): @@ -48,4 +47,4 @@ def test_verify_crl_unreachable(cert_builder, private_key): f.write(cert.public_bytes(serialization.Encoding.PEM)) with pytest.raises(Exception, match="Unable to retrieve CRL:"): - crl_verify(cert_tmp) + crl_verify(cert, cert_tmp)