]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Test AXFR with TSIG.
authorBrian Wellington <bwelling@xbill.org>
Tue, 16 Jun 2020 22:34:12 +0000 (15:34 -0700)
committerBrian Wellington <bwelling@xbill.org>
Tue, 16 Jun 2020 22:34:12 +0000 (15:34 -0700)
tests/test_query.py

index ec490f1cfdc2773a27d230b86aa297f62cf3113d..7fcce09487a6416c87eb56928fb5f2585ff38879 100644 (file)
@@ -303,6 +303,15 @@ class XfrTests(unittest.TestCase):
             zone = dns.zone.from_xfr(xfr)
             self.assertEqual(zone, expected)
 
+    def test_axfr_tsig(self):
+        expected = dns.zone.from_text(axfr_zone, origin='example')
+        with AXFRNanoNameserver(keyring=keyring) as ns:
+            xfr = dns.query.xfr(ns.tcp_address[0], 'example',
+                                port=ns.tcp_address[1],
+                                keyring=keyring, keyname='name')
+            zone = dns.zone.from_xfr(xfr)
+            self.assertEqual(zone, expected)
+
     def test_axfr_udp(self):
         def bad():
             with AXFRNanoNameserver() as ns: