summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2022-01-23 15:38:05 -0800
committerBob Halley <halley@dnspython.org>2022-01-23 15:38:05 -0800
commitc07d11ea060bc4bb02ee8deadba8365bd5b8b99d (patch)
tree07b0a7447376d25f4016a9f14242ff0e058f2bff /tests
parentecdc63b866856d7a38f73484722226f29b95224f (diff)
downloaddnspython-absolute_origin_zone_txn_fix.tar.gz
Use the version's origin if the zone doesn't have one yet. [#766]absolute_origin_zone_txn_fix
Diffstat (limited to 'tests')
-rw-r--r--tests/test_zone.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_zone.py b/tests/test_zone.py
index bdc99a3..d0765df 100644
--- a/tests/test_zone.py
+++ b/tests/test_zone.py
@@ -1012,6 +1012,13 @@ class VersionedZoneTestCase(unittest.TestCase):
rds = txn.get('example.', 'soa')
self.assertEqual(rds[0].serial, 1)
+ def testNoRelativizeReaderOriginInText(self):
+ z = dns.zone.from_text(example_text, relativize=False,
+ zone_factory=dns.versioned.Zone)
+ with z.reader(serial=1) as txn:
+ rds = txn.get('example.', '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)