aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-12-15 17:20:33 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-12-15 17:20:33 -0600
commitd5cccf7a376f4cf81cab6649646af0f09f5389ac (patch)
treeafdf7ad94784d12d02e9b95aa9569fdbda21ec33 /tests
parent25014658d6d7df3a97f72a5a65c6833a3364c51e (diff)
downloadcryptography-d5cccf7a376f4cf81cab6649646af0f09f5389ac.tar.gz
cryptography-d5cccf7a376f4cf81cab6649646af0f09f5389ac.tar.bz2
cryptography-d5cccf7a376f4cf81cab6649646af0f09f5389ac.zip
add parsed_version attribute to InvalidVersion
Diffstat (limited to 'tests')
-rw-r--r--tests/test_x509.py4
1 files changed, 3 insertions, 1 deletions
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"),