diff options
Diffstat (limited to 'tests/test_x509.py')
-rw-r--r-- | tests/test_x509.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py index f5fead53..c380b860 100644 --- a/tests/test_x509.py +++ b/tests/test_x509.py @@ -232,12 +232,15 @@ class TestRevokedCertificate(object): assert rev1.get_invalidity_date().isoformat() == "2015-01-01T00:00:00" # Check if all reason flags can be found in the CRL. + # Also test if CRL as iterator works. flags = set(x509.ReasonFlags) - # The first revoked cert doesn't have a reason. - for r in crl.revoked_certificates[1:]: + for r in crl: flags.discard(r.get_reason()) assert len(flags) == 0 + # Check that len() works for CRLs. + assert len(crl) == 12 + def test_duplicate_entry_ext(self, backend): crl = _load_cert( os.path.join("x509", "custom", "crl_dup_entry_ext.pem"), |