diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-12-22 21:40:20 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-12-22 21:40:20 -0600 |
commit | 3b95cd7f563809c136205c0642b4d54395e6b2eb (patch) | |
tree | 34ff578474ce4d1c665242a7b0dda0ff49f03044 /tests | |
parent | 53f45f92d8594ce97f6af99edba1ddca0c4fd838 (diff) | |
download | cryptography-3b95cd7f563809c136205c0642b4d54395e6b2eb.tar.gz cryptography-3b95cd7f563809c136205c0642b4d54395e6b2eb.tar.bz2 cryptography-3b95cd7f563809c136205c0642b4d54395e6b2eb.zip |
CRLNumber needs to be a class for reasons.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_x509.py | 2 | ||||
-rw-r--r-- | tests/test_x509_ext.py | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py index b39e1891..ae2746e3 100644 --- a/tests/test_x509.py +++ b/tests/test_x509.py @@ -192,7 +192,7 @@ class TestCertificateRevocationList(object): ian = crl.extensions.get_extension_for_class( x509.IssuerAlternativeName ) - assert crl_number.value == 1 + assert crl_number.value == x509.CRLNumber(1) assert crl_number.critical is False assert aki.value == x509.AuthorityKeyIdentifier( key_identifier=( diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py index 83145cd0..4b1d6a5a 100644 --- a/tests/test_x509_ext.py +++ b/tests/test_x509_ext.py @@ -1488,6 +1488,21 @@ class TestRSAIssuerAlternativeNameExtension(object): ] +class TestCRLNumber(object): + def test_eq(self): + crl_number = x509.CRLNumber(15) + assert crl_number == x509.CRLNumber(15) + + def test_ne(self): + crl_number = x509.CRLNumber(15) + assert crl_number != x509.CRLNumber(14) + assert crl_number != object() + + def test_repr(self): + crl_number = x509.CRLNumber(15) + assert repr(crl_number) == "<CRLNumber(15)>" + + class TestSubjectAlternativeName(object): def test_get_values_for_type(self): san = x509.SubjectAlternativeName( |