From 2c993f0d4eb43d39553857641d0686baba444b4b Mon Sep 17 00:00:00 2001 From: Nadezhda Ivanova Date: Mon, 22 Nov 2010 18:51:55 +0200 Subject: s4-tests: Adapted passwords.py to use set_minPwdAge from SamDB. Autobuild-User: Nadezhda Ivanova Autobuild-Date: Mon Nov 22 18:39:06 CET 2010 on sn-devel-104 --- source4/dsdb/tests/python/passwords.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'source4') diff --git a/source4/dsdb/tests/python/passwords.py b/source4/dsdb/tests/python/passwords.py index 461d135003..1512346402 100755 --- a/source4/dsdb/tests/python/passwords.py +++ b/source4/dsdb/tests/python/passwords.py @@ -948,14 +948,9 @@ m["dSHeuristics"] = MessageElement("000000001", FLAG_MOD_REPLACE, ldb.modify(m) # Get the old "minPwdAge" -res = ldb.search(base_dn, scope=SCOPE_BASE, attrs=["minPwdAge"]) -minPwdAge = res[0]["minPwdAge"][0] - +minPwdAge = ldb.get_minPwdAge() # Set it temporarely to "0" -m = Message() -m.dn = Dn(ldb, base_dn) -m["minPwdAge"] = MessageElement("0", FLAG_MOD_REPLACE, "minPwdAge") -ldb.modify(m) +ldb.set_minPwdAge("0") runner = SubunitTestRunner() rc = 0 @@ -974,9 +969,6 @@ else: ldb.modify(m) # Reset the "minPwdAge" as it was before -m = Message() -m.dn = Dn(ldb, base_dn) -m["minPwdAge"] = MessageElement(minPwdAge, FLAG_MOD_REPLACE, "minPwdAge") -ldb.modify(m) +ldb.set_minPwdAge(minPwdAge) sys.exit(rc) -- cgit