From: Douglas Bagnall Date: Wed, 7 Sep 2022 10:04:08 +0000 (+1200) Subject: pytest/password-lockout: fix using samba_tool function X-Git-Tag: talloc-2.4.0~1121 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b23ef30032416e074efbe6db991dfb0744eb54d;p=thirdparty%2Fsamba.git pytest/password-lockout: fix using samba_tool function Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/selftest/flapping.d/samba-tool b/selftest/flapping.d/samba-tool deleted file mode 100644 index a5c935c8ea0..00000000000 --- a/selftest/flapping.d/samba-tool +++ /dev/null @@ -1 +0,0 @@ -^samba4.ldap.password_lockout.python diff --git a/source4/dsdb/tests/python/password_lockout.py b/source4/dsdb/tests/python/password_lockout.py index ed0502967e3..325c0cfdd01 100755 --- a/source4/dsdb/tests/python/password_lockout.py +++ b/source4/dsdb/tests/python/password_lockout.py @@ -16,7 +16,7 @@ sys.path.insert(0, "bin/python") import samba from samba.tests.subunitrun import TestProgram, SubunitOptions -from samba.netcmd.main import cmd_sambatool +from samba.netcmd.main import samba_tool import samba.getopt as options @@ -143,12 +143,10 @@ lockoutTime: 0 def _reset_samba_tool(self, res): username = res[0]["sAMAccountName"][0] - cmd = cmd_sambatool.subcommands['user'].subcommands['unlock'] - result = cmd._run("samba-tool user unlock", - username, - "-H%s" % self.host_url, - "-U%s%%%s" % (global_creds.get_username(), - global_creds.get_password())) + result = samba_tool('user', 'unlock', username, + "-H%s" % self.host_url, + "-U%s%%%s" % (global_creds.get_username(), + global_creds.get_password())) self.assertEqual(result, None) def _reset_ldap_userAccountControl(self, res):