diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-12-26 13:31:48 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-12-26 13:31:48 -0600 |
commit | 657c3b8aea9a1a255d6247d070b57f86f99fa6ed (patch) | |
tree | 8a5bcc2b0f9f187ec8f4384e483c972feac053e4 /tests | |
parent | d67d77f666417bff7ea52e2754f7a680c7a83b0c (diff) | |
parent | f9a77b6886ac8942645a24b8cb65479fcfd23d09 (diff) | |
download | cryptography-657c3b8aea9a1a255d6247d070b57f86f99fa6ed.tar.gz cryptography-657c3b8aea9a1a255d6247d070b57f86f99fa6ed.tar.bz2 cryptography-657c3b8aea9a1a255d6247d070b57f86f99fa6ed.zip |
Merge pull request #2580 from alex/crl-number-hash
Refs #2578 -- implement __hash__ on CRLNumber
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_x509_ext.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py index b8105a4b..49a3433c 100644 --- a/tests/test_x509_ext.py +++ b/tests/test_x509_ext.py @@ -1579,6 +1579,13 @@ class TestCRLNumber(object): with pytest.raises(TypeError): x509.CRLNumber("notanumber") + def test_hash(self): + c1 = x509.CRLNumber(1) + c2 = x509.CRLNumber(1) + c3 = x509.CRLNumber(2) + assert hash(c1) == hash(c2) + assert hash(c1) != hash(c3) + class TestSubjectAlternativeName(object): def test_get_values_for_type(self): |