From: Brian Wellington Date: Mon, 11 May 2020 17:22:48 +0000 (-0700) Subject: Add more nsec3_hash() tests. X-Git-Tag: v2.0.0rc1~223 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=539883bb8de07535cad42607bef515c973fa1e3e;p=thirdparty%2Fdnspython.git Add more nsec3_hash() tests. --- diff --git a/tests/test_nsec3_hash.py b/tests/test_nsec3_hash.py index c242a819..58bdeb36 100644 --- a/tests/test_nsec3_hash.py +++ b/tests/test_nsec3_hash.py @@ -1,6 +1,6 @@ import unittest -from dns import dnssec +from dns import dnssec,name class NSEC3Hash(unittest.TestCase): @@ -33,6 +33,22 @@ class NSEC3Hash(unittest.TestCase): ("www.test.domain.dev.", "B4", 2, "nv7ti6brgh94ke2f3pgiigjevfgpo5j0", 1), ("*.test-domain.dev", "", 0, "o6uadafckb6hea9qpcgir2gl71vt23gu", 1), ("*.test-domain.dev", "", 45, "505k9g118d9sofnjhh54rr8fadgpa0ct", 1), + # Alternate forms of parameters + ( + name.from_text("example"), + "aabbccdd", + 12, + "0p9mhaveqvm6t7vbl5lop2u3t2rp3tom", + 1, + ), + ( + "example", + b"\xaa\xbb\xcc\xdd", + 12, + "0p9mhaveqvm6t7vbl5lop2u3t2rp3tom", + 1, + ), + ("*.test-domain.dev", None, 45, "505k9g118d9sofnjhh54rr8fadgpa0ct", 1), ] def test_hash_function(self):