From f9a77b6886ac8942645a24b8cb65479fcfd23d09 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 26 Dec 2015 12:14:25 -0500 Subject: Refs #2578 -- implement __hash__ on CRLNumber --- tests/test_x509_ext.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') 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): -- cgit v1.2.3