summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2020-02-07 11:02:38 +1300
committerNoel Power <npower@samba.org>2020-02-07 10:37:37 +0000
commitc247afbda00013bf4821e5a2d4f3166bf31814f0 (patch)
tree052175d27c58dbe57351822b516f0af5efbb8762 /auth
parent3bc7acc62646b105b03fd3c65e9170a373f95392 (diff)
downloadsamba-c247afbda00013bf4821e5a2d4f3166bf31814f0.tar.gz
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>
Diffstat (limited to 'auth')
-rwxr-xr-xauth/credentials/tests/bind.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/auth/credentials/tests/bind.py b/auth/credentials/tests/bind.py
index 2eaf0c0fd08..79bf93355b1 100755
--- a/auth/credentials/tests/bind.py
+++ b/auth/credentials/tests/bind.py
@@ -65,7 +65,7 @@ class BindTests(samba.tests.TestCase):
if self.info_dc is None:
res = self.ldb.search(base="", expression="", scope=SCOPE_BASE, attrs=["*"])
- self.assertEquals(len(res), 1)
+ self.assertEqual(len(res), 1)
BindTests.info_dc = res[0]
# cache some of RootDSE props
self.schema_dn = self.info_dc["schemaNamingContext"][0]
@@ -120,7 +120,7 @@ unicodePwd:: """ + base64.b64encode(u"\"P@ssw0rd\"".encode('utf-16-le')).decode(
ldb_res = self.ldb.search(base=self.domain_dn,
scope=SCOPE_SUBTREE,
expression="(samAccountName=%s)" % self.username)
- self.assertEquals(len(ldb_res), 1)
+ self.assertEqual(len(ldb_res), 1)
user_dn = ldb_res[0]["dn"]
self.addCleanup(delete_force, self.ldb, user_dn)
@@ -154,7 +154,7 @@ unicodePwd:: """ + base64.b64encode(u"\"P@ssw0rd\"".encode('utf-16-le')).decode(
ldb_res = self.ldb.search(base=self.domain_dn,
scope=SCOPE_SUBTREE,
expression="(samAccountName=%s)" % self.username)
- self.assertEquals(len(ldb_res), 1)
+ self.assertEqual(len(ldb_res), 1)
user_dn = ldb_res[0]["dn"]
self.addCleanup(delete_force, self.ldb, user_dn)