diff options
author | Nadezhda Ivanova <nivanova@samba.org> | 2010-11-22 18:50:35 +0200 |
---|---|---|
committer | Nadezhda Ivanova <nivanova@samba.org> | 2010-11-22 18:52:04 +0200 |
commit | 2c96be185d7d8222fc7f1aef513ca0e5b0ca2408 (patch) | |
tree | 0355d08c13ddfc8b8413e58dfa298f8f73a27d29 /source4/dsdb/tests/python/acl.py | |
parent | c88b90e9f69554832a4932cbc9e44ea1c3bd2b81 (diff) | |
download | samba-2c96be185d7d8222fc7f1aef513ca0e5b0ca2408.tar.gz samba-2c96be185d7d8222fc7f1aef513ca0e5b0ca2408.tar.xz samba-2c96be185d7d8222fc7f1aef513ca0e5b0ca2408.zip |
s4-tests: Adapted acl.py to use set_minPwdAge from SamDB.
Diffstat (limited to 'source4/dsdb/tests/python/acl.py')
-rwxr-xr-x | source4/dsdb/tests/python/acl.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/source4/dsdb/tests/python/acl.py b/source4/dsdb/tests/python/acl.py index 14800053c9..8a1c6a43a4 100755 --- a/source4/dsdb/tests/python/acl.py +++ b/source4/dsdb/tests/python/acl.py @@ -232,12 +232,6 @@ url: www.example.com m["dSHeuristics"] = MessageElement([], FLAG_MOD_DELETE, "dsHeuristics") self.ldb_admin.modify(m) - def set_minPwdAge(self, value): - m = Message() - m.dn = Dn(self.ldb_admin, self.base_dn) - m["minPwdAge"] = MessageElement(value, FLAG_MOD_REPLACE, "minPwdAge") - self.ldb_admin.modify(m) - #tests on ldap add operations class AclAddTests(AclTests): @@ -1341,19 +1335,18 @@ class AclCARTests(AclTests): else: self.dsheuristics = None - res = self.ldb_admin.search(self.base_dn, scope=SCOPE_BASE, attrs=["minPwdAge"]) - self.minPwdAge = res[0]["minPwdAge"][0] + self.minPwdAge = self.ldb_admin.get_minPwdAge() # Set the "dSHeuristics" to have the tests run against Windows Server self.set_dsheuristics("000000001") # Set minPwdAge to 0 - self.set_minPwdAge("0") + self.ldb_admin.set_minPwdAge("0") def tearDown(self): super(AclCARTests, self).tearDown() #restore original values self.set_dsheuristics(self.dsheuristics) - self.set_minPwdAge(self.minPwdAge) + self.ldb_admin.set_minPwdAge(self.minPwdAge) self.delete_force(self.ldb_admin, self.get_user_dn(self.user_with_wp)) self.delete_force(self.ldb_admin, self.get_user_dn(self.user_with_pc)) |