diff --git a/regression-tests.recursor-dnssec/test_Lua.py b/regression-tests.recursor-dnssec/test_Lua.py index 222c9181c1621..dad74051f5d68 100644 --- a/regression-tests.recursor-dnssec/test_Lua.py +++ b/regression-tests.recursor-dnssec/test_Lua.py @@ -1006,7 +1006,7 @@ def testDROP(self): """ 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""" diff --git a/regression-tests.recursor-dnssec/test_Notify.py b/regression-tests.recursor-dnssec/test_Notify.py index 689f346b72285..622ad37ec6c2e 100644 --- a/regression-tests.recursor-dnssec/test_Notify.py +++ b/regression-tests.recursor-dnssec/test_Notify.py @@ -103,9 +103,9 @@ def testNotify(self): 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) diff --git a/regression-tests.recursor-dnssec/test_RecDnstap.py b/regression-tests.recursor-dnssec/test_RecDnstap.py index 2cde8ee086743..d56b8754d2fed 100644 --- a/regression-tests.recursor-dnssec/test_RecDnstap.py +++ b/regression-tests.recursor-dnssec/test_RecDnstap.py @@ -186,7 +186,7 @@ def FrameStreamUnixListener(cls, conn, param): 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)