_qnameSuffix = '.edns-tests.example.'
_config_template = """
+qname-minimization=no
forward-zones=edns-tests.example=%s.22
udp-truncation-threshold=%d
edns-outgoing-bufsize=%d
"""
response = dns.message.from_wire(rawResponse)
- self.assertEquals(len(rawResponse), size)
+ self.assertEqual(len(rawResponse), size)
self.assertRcodeEqual(response, dns.rcode.NOERROR)
self.assertMessageHasFlags(response, ['QR', 'RD', 'RA'])
for record in response.answer:
- self.assertEquals(record.rdtype, dns.rdatatype.TXT)
+ self.assertEqual(record.rdtype, dns.rdatatype.TXT)
for part in record:
for string in part.strings:
self.assertTrue(len(string) == 255 or
_qnameSuffix = '.edns-tests.example.'
_config_template = """
+qname-minimization=no
forward-zones=edns-tests.example=%s.22
udp-truncation-threshold=%d
edns-outgoing-bufsize=%d
_qnameSuffix = '.edns-tests.example.'
_config_template = """
+qname-minimization=no
forward-zones=edns-tests.example=%s.22
udp-truncation-threshold=%d
edns-outgoing-bufsize=%d
# This is an authoritative answer
response.flags |= dns.flags.AA
# We pretend to do EDNS with a 4096 buffer size
- response.edns = 0
- response.payload = 4096
+ response.use_edns(payload=4096)
# What we use to fill the TXT records
# Test number + 64, so 01 = 'A', 02 = 'B' etc...