aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_x509.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_x509.py')
-rw-r--r--tests/test_x509.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 099dfd5f..755b65fa 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -461,15 +461,20 @@ class TestRevokedCertificate(object):
def test_indexing(self, backend):
crl = _load_cert(
- os.path.join("x509", "custom", "crl_empty.pem"),
+ os.path.join("x509", "custom", "crl_all_reasons.pem"),
x509.load_pem_x509_crl,
backend
)
with pytest.raises(IndexError):
- crl[-1]
+ crl[-13]
with pytest.raises(IndexError):
- crl[0]
+ crl[12]
+
+ assert crl[-1].serial_number == crl[11].serial_number
+ assert len(crl[2:4]) == 2
+ assert crl[2:4][0].serial_number == crl[2].serial_number
+ assert crl[2:4][1].serial_number == crl[3].serial_number
@pytest.mark.requires_backend_interface(interface=RSABackend)