summaryrefslogtreecommitdiff
path: root/tests/test_zone.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_zone.py')
-rw-r--r--tests/test_zone.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_zone.py b/tests/test_zone.py
index 45fa272..9059388 100644
--- a/tests/test_zone.py
+++ b/tests/test_zone.py
@@ -1076,6 +1076,18 @@ class VersionedZoneTestCase(unittest.TestCase):
dns.rdatatype.RRSIG,
dns.rdatatype.NSEC))
+ def testGetRdataset1(self):
+ z = dns.zone.from_text(example_text, 'example.', relativize=True,
+ zone_factory=dns.versioned.Zone)
+ rds = z.get_rdataset('@', 'soa')
+ exrds = dns.rdataset.from_text('IN', 'SOA', 300, 'foo bar 1 2 3 4 5')
+ self.assertEqual(rds, exrds)
+
+ def testGetRdataset2(self):
+ z = dns.zone.from_text(example_text, 'example.', relativize=True,
+ zone_factory=dns.versioned.Zone)
+ rds = z.get_rdataset('@', 'loc')
+ self.assertTrue(rds is None)
if __name__ == '__main__':
unittest.main()