]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pytest/password-lockout: fix using samba_tool function
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 7 Sep 2022 10:04:08 +0000 (22:04 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 8 Sep 2022 22:34:36 +0000 (22:34 +0000)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/flapping.d/samba-tool [deleted file]
source4/dsdb/tests/python/password_lockout.py

diff --git a/selftest/flapping.d/samba-tool b/selftest/flapping.d/samba-tool
deleted file mode 100644 (file)
index a5c935c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-^samba4.ldap.password_lockout.python
index ed0502967e31f35d59fc3e20d7a9b2ee6cffe1cf..325c0cfdd019b1c939f0ed680ef54aaa7bfb1430 100755 (executable)
@@ -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):