summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2021-07-05 18:33:59 -0700
committerBob Halley <halley@dnspython.org>2021-07-05 18:33:59 -0700
commit01ad365a4312ccef5afd35636024e343bd633425 (patch)
tree3c6c6bf15589f54e5bae0aff6011e53890d38495 /tests
parentf61a939fd122333eb708c1d094373f4a330cd765 (diff)
downloaddnspython-01ad365a4312ccef5afd35636024e343bd633425.tar.gz
Do some basic xfr checks with an unversioned zone too.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_xfr.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_xfr.py b/tests/test_xfr.py
index 3fa1eba..462e3a0 100644
--- a/tests/test_xfr.py
+++ b/tests/test_xfr.py
@@ -269,6 +269,16 @@ def test_basic_axfr():
ez = dns.zone.from_text(base, 'example.')
assert z == ez
+def test_basic_axfr_unversioned():
+ z = dns.zone.Zone('example.')
+ m = dns.message.from_text(axfr, origin=z.origin,
+ one_rr_per_rrset=True)
+ with dns.xfr.Inbound(z, dns.rdatatype.AXFR) as xfr:
+ done = xfr.process_message(m)
+ assert done
+ ez = dns.zone.from_text(base, 'example.')
+ assert z == ez
+
def test_basic_axfr_two_parts():
z = dns.versioned.Zone('example.')
m1 = dns.message.from_text(axfr1, origin=z.origin,
@@ -302,6 +312,16 @@ def test_basic_ixfr():
ez = dns.zone.from_text(ixfr_expected, 'example.')
assert z == ez
+def test_basic_ixfr_unversioned():
+ z = dns.zone.from_text(base, 'example.')
+ m = dns.message.from_text(ixfr, origin=z.origin,
+ one_rr_per_rrset=True)
+ with dns.xfr.Inbound(z, dns.rdatatype.IXFR, serial=1) as xfr:
+ done = xfr.process_message(m)
+ assert done
+ ez = dns.zone.from_text(ixfr_expected, 'example.')
+ assert z == ez
+
def test_compressed_ixfr():
z = dns.zone.from_text(base, 'example.',
zone_factory=dns.versioned.Zone)