1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +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,7 +52,7 @@ class GraphFunctionTests(samba.tests.TestCase):
([0x03, 0x33] * 42, 42 * 6),
(list(range(7)) * 12, 12 * 9),
(list(range(4)) * 21, 21 * 4)):
self.assertEquals(total_schedule(schedule), total)
self.assertEqual(total_schedule(schedule), total)
def test_convert_schedule_to_repltimes(self):
for ntdsconn_times, repltimes in (
@ -63,5 +63,5 @@ class GraphFunctionTests(samba.tests.TestCase):
(list(range(7)) * 24,
[0x01, 0x23, 0x45, 0x60, 0x12, 0x34, 0x56] * 12)):
schedule = ntdsconn_schedule(ntdsconn_times)
self.assertEquals(convert_schedule_to_repltimes(schedule),
self.assertEqual(convert_schedule_to_repltimes(schedule),
repltimes)