aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_x509.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-12-26 12:05:51 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2015-12-26 12:05:51 -0500
commitd67d77f666417bff7ea52e2754f7a680c7a83b0c (patch)
tree796e8feff62e053b9a73626402424e322dfe48bd /tests/test_x509.py
parent0860ef60adc7974dc26cfdd3c7adeb5e4e6e6448 (diff)
parent7058eced3a27115f721887e836d16ee4fe4c7e9d (diff)
downloadcryptography-d67d77f666417bff7ea52e2754f7a680c7a83b0c.tar.gz
cryptography-d67d77f666417bff7ea52e2754f7a680c7a83b0c.tar.bz2
cryptography-d67d77f666417bff7ea52e2754f7a680c7a83b0c.zip
Merge pull request #2579 from reaperhulk/crlentry-crlreason
switch CRLReason to use a class
Diffstat (limited to 'tests/test_x509.py')
-rw-r--r--tests/test_x509.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index c91f08ba..757df442 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -379,9 +379,9 @@ class TestRevokedCertificate(object):
rev1 = crl[1]
assert isinstance(rev1.extensions, x509.Extensions)
- reason = rev1.extensions.get_extension_for_oid(
- x509.OID_CRL_REASON).value
- assert reason == x509.ReasonFlags.unspecified
+ reason = rev1.extensions.get_extension_for_class(
+ x509.CRLReason).value
+ assert reason == x509.CRLReason(x509.ReasonFlags.unspecified)
issuer = rev1.extensions.get_extension_for_class(
x509.CertificateIssuer).value
@@ -395,12 +395,12 @@ class TestRevokedCertificate(object):
flags = set(x509.ReasonFlags)
for rev in crl:
try:
- r = rev.extensions.get_extension_for_oid(x509.OID_CRL_REASON)
+ r = rev.extensions.get_extension_for_class(x509.CRLReason)
except x509.ExtensionNotFound:
# Not all revoked certs have a reason extension.
pass
else:
- flags.discard(r.value)
+ flags.discard(r.value.reason)
assert len(flags) == 0