1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-30 19:42:05 +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

@ -52,18 +52,18 @@ class ShareTests(TestCase):
def test_len_no_global(self):
shares = self._get_shares({})
self.assertEquals(0, len(shares))
self.assertEqual(0, len(shares))
def test_iter(self):
self.assertEquals([], list(self._get_shares({})))
self.assertEquals([], list(self._get_shares({"global": {}})))
self.assertEquals(
self.assertEqual([], list(self._get_shares({})))
self.assertEqual([], list(self._get_shares({"global": {}})))
self.assertEqual(
["bla"],
list(self._get_shares({"global": {}, "bla": {}})))
def test_len(self):
shares = self._get_shares({"global": {}})
self.assertEquals(0, len(shares))
self.assertEqual(0, len(shares))
def test_getitem_nonexistent(self):
shares = self._get_shares({"global": {}})