1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-29 15:42:04 +03:00

pytests: heed assertEquals deprecation warning en-masse

TestCase.assertEquals() is an alias for TestCase.assertEqual() and
has been deprecated since Python 2.7.

When we run our tests with in python developer mode (`PYTHONDEVMODE=1
make test`) we get 580 DeprecationWarnings about this.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
This commit is contained in:
Douglas Bagnall
2020-02-07 11:02:38 +13:00
committed by Noel Power
parent 3bc7acc626
commit c247afbda0
129 changed files with 3795 additions and 3795 deletions

View File

@ -39,6 +39,6 @@ class TimeCmdTestCase(SambaToolCmdTest):
def test_timefail(self):
"""Run time against a non-existent server, and make sure it fails"""
(result, out, err) = self.runcmd("time", "notaserver")
self.assertEquals(result, -1, "check for result code")
self.assertEqual(result, -1, "check for result code")
self.assertNotEqual(err.strip().find("NT_STATUS_OBJECT_NAME_NOT_FOUND"), -1, "ensure right error string")
self.assertEquals(out, "", "ensure no output returned")
self.assertEqual(out, "", "ensure no output returned")