diff options
| author | Bob Halley <halley@dnspython.org> | 2013-08-13 09:51:49 -0700 |
|---|---|---|
| committer | Bob Halley <halley@dnspython.org> | 2013-08-13 09:51:49 -0700 |
| commit | 7e1e49cb7dd044bbe0cf3722e358d856643b7c65 (patch) | |
| tree | cf541d74e14ca7490d657d3248a3601cb0c849f9 | |
| parent | c8f9645e596eb634564ec5f2b9506526fd7aafde (diff) | |
| download | dnspython-7e1e49cb7dd044bbe0cf3722e358d856643b7c65.tar.gz | |
Add regression test for APL trailing zero bug
| -rw-r--r-- | tests/bugs.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/bugs.py b/tests/bugs.py index dd18f31..79b30eb 100644 --- a/tests/bugs.py +++ b/tests/bugs.py @@ -13,6 +13,7 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +import binascii import unittest import dns.rdata @@ -45,5 +46,11 @@ class BugsTestCase(unittest.TestCase): "1 0 100 ABCD SCBCQHKU35969L2A68P3AD59LHF30715") self.assertTrue(rdata.windows == []) + def test_APL_trailing_zero(self): + rd4 = dns.rdata.from_text(dns.rdataclass.IN, dns.rdatatype.APL, + '!1:127.0.0.0/1') + out4 = rd4.to_digestable(dns.name.from_text("test")) + self.assertTrue(binascii.hexlify(out4).decode('ascii') == '000101817f') + if __name__ == '__main__': unittest.main() |
