diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-12-27 15:57:57 -0500 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2015-12-27 15:57:57 -0500 |
commit | b25888daba748af45bc96afbd08a25f3820ece52 (patch) | |
tree | 53e6907487555181f84f90e3644b5cc56b9b9248 /tests/test_x509_ext.py | |
parent | b04b67e06ea638e23e06f3fde151a6912c184025 (diff) | |
parent | b39af8d7195757b5025417187376b04e387264a1 (diff) | |
download | cryptography-b25888daba748af45bc96afbd08a25f3820ece52.tar.gz cryptography-b25888daba748af45bc96afbd08a25f3820ece52.tar.bz2 cryptography-b25888daba748af45bc96afbd08a25f3820ece52.zip |
Merge pull request #2594 from reaperhulk/hash-bc
implement hash on basicconstraints
Diffstat (limited to 'tests/test_x509_ext.py')
-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 67081b23..898f9bcf 100644 --- a/tests/test_x509_ext.py +++ b/tests/test_x509_ext.py @@ -837,6 +837,13 @@ class TestBasicConstraints(object): "<BasicConstraints(ca=True, path_length=None)>" ) + def test_hash(self): + na = x509.BasicConstraints(ca=True, path_length=None) + na2 = x509.BasicConstraints(ca=True, path_length=None) + na3 = x509.BasicConstraints(ca=True, path_length=0) + assert hash(na) == hash(na2) + assert hash(na) != hash(na3) + def test_eq(self): na = x509.BasicConstraints(ca=True, path_length=None) na2 = x509.BasicConstraints(ca=True, path_length=None) |