diff options
author | Bob Halley <halley@dnspython.org> | 2021-11-26 13:55:36 -0800 |
---|---|---|
committer | Bob Halley <halley@dnspython.org> | 2021-11-26 13:55:36 -0800 |
commit | 8028c05b94c1bcb2deaa1e6444b3bcfc8b63bcb4 (patch) | |
tree | 75b8c0e86f8c45b8b4fe46d36d4c50512d60c636 /tests | |
parent | e30922b59ed7fb4c6ad744f3d92e49b9f3bf62c3 (diff) | |
download | dnspython-8028c05b94c1bcb2deaa1e6444b3bcfc8b63bcb4.tar.gz |
Node find_rdataset() should set covers when creating [#730]
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_zone.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/test_zone.py b/tests/test_zone.py index e8dd966..3e34e72 100644 --- a/tests/test_zone.py +++ b/tests/test_zone.py @@ -145,7 +145,7 @@ Königsgäßchen 300 NS Königsgäßchen misc_cases_input = """ $ORIGIN example. $TTL 300 - + @ soa foo bar 1 2 3 4 5 @ ns ns1 @ ns ns2 @@ -501,6 +501,15 @@ class ZoneTestCase(unittest.TestCase): node.find_rdataset(dns.rdataclass.IN, dns.rdatatype.LOC) self.assertRaises(KeyError, bad) + def testNodeFindRdataset3(self): + z = dns.zone.from_text(example_text, 'example.', relativize=True) + node = z['@'] + rds = node.find_rdataset(dns.rdataclass.IN, dns.rdatatype.RRSIG, + dns.rdatatype.A, create=True) + self.assertEqual(rds.rdclass, dns.rdataclass.IN) + self.assertEqual(rds.rdtype, dns.rdatatype.RRSIG) + self.assertEqual(rds.covers, dns.rdatatype.A) + def testNodeGetRdataset1(self): z = dns.zone.from_text(example_text, 'example.', relativize=True) node = z['@'] |