summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests/python
diff options
context:
space:
mode:
authorNadezhda Ivanova <nivanova@samba.org>2010-11-18 13:13:35 +0200
committerNadezhda Ivanova <nivanova@samba.org>2010-11-18 12:09:17 +0000
commit763165c7bcff5d4b2c331a75869a7db82f5ec91a (patch)
tree5cef4c30578ff70a7d7d31e38ca5ee81996c7acd /source4/dsdb/tests/python
parent56512fb1da0fb0ffecd07059f8dc43ed3cfcd780 (diff)
downloadsamba-763165c7bcff5d4b2c331a75869a7db82f5ec91a.tar.gz
samba-763165c7bcff5d4b2c331a75869a7db82f5ec91a.tar.bz2
samba-763165c7bcff5d4b2c331a75869a7db82f5ec91a.zip
s4-tests: Acl tests should use the existing samdb domain_dn method instead of defining a new one
Diffstat (limited to 'source4/dsdb/tests/python')
-rwxr-xr-xsource4/dsdb/tests/python/acl.py8
1 files changed, 1 insertions, 7 deletions
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,