]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
improve version _validate_name test coverage
authorBob Halley <halley@dnspython.org>
Sun, 6 Mar 2022 17:48:14 +0000 (09:48 -0800)
committerBob Halley <halley@dnspython.org>
Sun, 6 Mar 2022 17:48:14 +0000 (09:48 -0800)
tests/test_zone.py

index 473c73339011f13a8f4dda018234d98a97cfb37e..7f3bf13c0db340647ffa629dac698d3e80f0d492 100644 (file)
@@ -1026,6 +1026,13 @@ class VersionedZoneTestCase(unittest.TestCase):
             rds = txn.get('example.', 'soa')
             self.assertEqual(rds[0].serial, 1)
 
+    def testNoRelativizeReaderAbsoluteGet(self):
+        z = dns.zone.from_text(example_text, 'example.', relativize=False,
+                               zone_factory=dns.versioned.Zone)
+        with z.reader(serial=1) as txn:
+            rds = txn.get(dns.name.empty, 'soa')
+            self.assertEqual(rds[0].serial, 1)
+
     def testCnameAndOtherDataAddOther(self):
         z = dns.zone.from_text(example_cname, 'example.', relativize=True,
                                zone_factory=dns.versioned.Zone)