]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - regression-tests.recursor-dnssec/test_EDNS.py
rec: dnspython's API changed wrt NSID, apply (version dependent) fix in regression...
[thirdparty/pdns.git] / regression-tests.recursor-dnssec / test_EDNS.py
index b81849f4e70009b1a6aca5ee7bd680d2e980e44d..172ab398038951e5f5921eaea9ccf4609553512d 100644 (file)
@@ -4,6 +4,8 @@ import socket
 import struct
 import threading
 import time
+import sys
+from unittest import SkipTest
 
 from recursortests import RecursorTest
 from twisted.internet.protocol import DatagramProtocol
@@ -23,19 +25,20 @@ class EDNSTest(RecursorTest):
         Ensure the recursor does not reply with an unknown option when one is
         sent in the query
         """
-        query = dns.message.make_query('version.bind.', 'TXT', 'CH', use_edns=0,
-                                       payload=4096)
         unknownOpt = dns.edns.GenericOption(65005, b'1234567890')
-        query.options = [unknownOpt]
+        query = dns.message.make_query('version.bind.', 'TXT', 'CH', use_edns=0,
+                                       payload=4096, options=[unknownOpt])
         response = self.sendUDPQuery(query)
         self.assertRcodeEqual(response, dns.rcode.NOERROR)
-        self.assertEqual(response.options, [])
+        self.assertEqual(response.options, ())
 
     def testEDNSBadVers(self):
         """
         Ensure the rcode is BADVERS when we send an unsupported EDNS version and
         the query is not processed any further.
         """
+        if sys.version_info >= (3, 11) and sys.version_info <= (3, 11, 3):
+            raise SkipTest("Test skipped, see https://github.com/PowerDNS/pdns/pull/12912")
         query = dns.message.make_query('version.bind.', 'TXT', 'CH', use_edns=5,
                                        payload=4096)
         response = self.sendUDPQuery(query)