summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2020-06-23 07:25:03 -0700
committerBob Halley <halley@dnspython.org>2020-06-23 07:25:03 -0700
commit68e2e15487377993fa6e8aceeb37a3d7ccb8a71e (patch)
tree59ad5bbc1b2bd1813f4a7485fcf10be4be0333b7
parent5a71aaf1dd4c590f53f0ba0cbb7d13cb9f14cbdb (diff)
downloaddnspython-68e2e15487377993fa6e8aceeb37a3d7ccb8a71e.tar.gz
test CH A
-rw-r--r--tests/test_rdata.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_rdata.py b/tests/test_rdata.py
index 32bdd22..226d5b3 100644
--- a/tests/test_rdata.py
+++ b/tests/test_rdata.py
@@ -380,5 +380,18 @@ class RdataTestCase(unittest.TestCase):
dns.rdatatype.GPOS,
wire, 0, len(wire)))
+ def test_chaos(self):
+ # avoid red spot on our coverage :)
+ r1 = dns.rdata.from_text(dns.rdataclass.CH, dns.rdatatype.A,
+ 'chaos. 12345')
+ w = r1.to_wire()
+ r2 = dns.rdata.from_wire(dns.rdataclass.CH, dns.rdatatype.A, w, 0,
+ len(w))
+ self.assertEqual(r1, r2)
+ self.assertEqual(r1.domain, dns.name.from_text('chaos'))
+ # the address input is octal
+ self.assertEqual(r1.address, 0o12345)
+ self.assertEqual(r1.to_text(), 'chaos. 12345')
+
if __name__ == '__main__':
unittest.main()