""" postresolve_ffi: test that we can do a DROP for a name and type combo"""
query = dns.message.make_query('example', 'TXT')
res = self.sendUDPQuery(query)
- self.assertEquals(res, None)
+ self.assertEqual(res, None)
def testNXDOMAIN(self):
""" postresolve_ffi: test that we can return a NXDOMAIN for a name and type combo"""
sender = getattr(self, method)
res = sender(notify)
self.assertRcodeEqual(res, dns.rcode.NOERROR)
- self.assertEquals(res.opcode(), 4)
+ self.assertEqual(res.opcode(), 4)
print(res)
- self.assertEquals(res.question[0].to_text(), 'example. IN SOA')
+ self.assertEqual(res.question[0].to_text(), 'example. IN SOA')
self.checkRecordCacheMetrics(3, 1)
fstrm_handle_bidir_connection(conn, lambda data: \
param.queue.put(data, True, timeout=2.0))
except socket.error as e:
- if e.errno == 9:
+ if e.errno == errno.EBADF or e.errno == errno.EPIPE:
break
sys.stderr.write("Unexpected socket error %s\n" % str(e))
sys.exit(1)