aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_x509_ext.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_x509_ext.py')
-rw-r--r--tests/test_x509_ext.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py
index ff826458..b13405de 100644
--- a/tests/test_x509_ext.py
+++ b/tests/test_x509_ext.py
@@ -2228,6 +2228,22 @@ class TestAccessDescription(object):
assert ad != ad3
assert ad != object()
+ def test_hash(self):
+ ad = x509.AccessDescription(
+ AuthorityInformationAccessOID.OCSP,
+ x509.UniformResourceIdentifier(u"http://ocsp.domain.com")
+ )
+ ad2 = x509.AccessDescription(
+ AuthorityInformationAccessOID.OCSP,
+ x509.UniformResourceIdentifier(u"http://ocsp.domain.com")
+ )
+ ad3 = x509.AccessDescription(
+ AuthorityInformationAccessOID.CA_ISSUERS,
+ x509.UniformResourceIdentifier(u"http://ocsp.domain.com")
+ )
+ assert hash(ad) == hash(ad2)
+ assert hash(ad) != hash(ad3)
+
class TestAuthorityInformationAccess(object):
def test_invalid_descriptions(self):