1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +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

@ -117,7 +117,7 @@ class NtaclsBackupRestoreTests(SmbdBaseTests):
# This works in conjunction with the TEST_UMASK in smbd_base
# to ensure that permissions are not related to the umask
# but instead the smb.conf settings
self.assertEquals(mode & 0o777, 0o755)
self.assertEqual(mode & 0o777, 0o755)
self.assertTrue(os.path.isdir(dirpath))
def test_smbd_create_file(self):
@ -134,7 +134,7 @@ class NtaclsBackupRestoreTests(SmbdBaseTests):
# This works in conjunction with the TEST_UMASK in smbd_base
# to ensure that permissions are not related to the umask
# but instead the smb.conf settings
self.assertEquals(mode & 0o777, 0o644)
self.assertEqual(mode & 0o777, 0o644)
# As well as checking that unlink works, this removes the
# fake xattrs from the dev/inode based DB
@ -157,8 +157,8 @@ class NtaclsBackupRestoreTests(SmbdBaseTests):
sd2 = self.ntacls_helper.getntacl(
file_path, system_session_unix(), as_sddl=True, direct_db_access=True)
self.assertEquals(sd0, sd1)
self.assertEquals(sd1, sd2)
self.assertEqual(sd0, sd1)
self.assertEqual(sd1, sd2)
def test_backup_online(self):
"""