From d5cccf7a376f4cf81cab6649646af0f09f5389ac Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 15 Dec 2014 17:20:33 -0600 Subject: add parsed_version attribute to InvalidVersion --- tests/test_x509.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_x509.py b/tests/test_x509.py index f8d19a54..5383871a 100644 --- a/tests/test_x509.py +++ b/tests/test_x509.py @@ -140,9 +140,11 @@ class TestRSACertificate(object): x509.load_pem_x509_certificate, backend ) - with pytest.raises(x509.InvalidVersion): + with pytest.raises(x509.InvalidVersion) as exc: cert.version + assert exc.value.parsed_version == 7 + def test_version_1_cert(self, backend): cert = _load_cert( os.path.join("x509", "v1_cert.pem"), -- cgit v1.2.3