From 763165c7bcff5d4b2c331a75869a7db82f5ec91a Mon Sep 17 00:00:00 2001 From: Nadezhda Ivanova Date: Thu, 18 Nov 2010 13:13:35 +0200 Subject: s4-tests: Acl tests should use the existing samdb domain_dn method instead of defining a new one --- source4/dsdb/tests/python/acl.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'source4/dsdb') diff --git a/source4/dsdb/tests/python/acl.py b/source4/dsdb/tests/python/acl.py index 1726c43efc..b448d65f7d 100755 --- a/source4/dsdb/tests/python/acl.py +++ b/source4/dsdb/tests/python/acl.py @@ -64,12 +64,6 @@ class AclTests(samba.tests.TestCase): except LdbError, (num, _): self.assertEquals(num, ERR_NO_SUCH_OBJECT) - def find_basedn(self, ldb): - res = ldb.search(base="", expression="", scope=SCOPE_BASE, - attrs=["defaultNamingContext"]) - self.assertEquals(len(res), 1) - return res[0]["defaultNamingContext"][0] - def find_domain_sid(self, ldb): res = ldb.search(base=self.base_dn, expression="(objectClass=*)", scope=SCOPE_BASE) return ndr_unpack(security.dom_sid,res[0]["objectSid"][0]) @@ -77,7 +71,7 @@ class AclTests(samba.tests.TestCase): def setUp(self): super(AclTests, self).setUp() self.ldb_admin = ldb - self.base_dn = self.find_basedn(self.ldb_admin) + self.base_dn = ldb.domain_dn() self.domain_sid = self.find_domain_sid(self.ldb_admin) self.user_pass = "samba123@" res = self.ldb_admin.search(base="", expression="", scope=SCOPE_BASE, -- cgit