From 47784a14708827a0272b638c6ab088d74b392908 Mon Sep 17 00:00:00 2001 From: Nadezhda Ivanova Date: Thu, 18 Nov 2010 13:17:00 +0200 Subject: s4-tests: Descriptor tests should use the existing samdb domain_dn method instead of defining a new one Autobuild-User: Nadezhda Ivanova Autobuild-Date: Thu Nov 18 12:52:48 UTC 2010 on sn-devel-104 --- source4/dsdb/tests/python/sec_descriptor.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'source4/dsdb') diff --git a/source4/dsdb/tests/python/sec_descriptor.py b/source4/dsdb/tests/python/sec_descriptor.py index 557d907d18..5b3bb6a2ca 100755 --- a/source4/dsdb/tests/python/sec_descriptor.py +++ b/source4/dsdb/tests/python/sec_descriptor.py @@ -65,12 +65,6 @@ class DescriptorTests(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_configurationdn(self, ldb): res = ldb.search(base="", expression="", scope=SCOPE_BASE, attrs=["configurationNamingContext"]) self.assertEquals(len(res), 1) @@ -276,7 +270,7 @@ member: """ + self.get_users_domain_dn(username) def setUp(self): super(DescriptorTests, self).setUp() self.ldb_admin = ldb - self.base_dn = self.find_basedn(self.ldb_admin) + self.base_dn = ldb.domain_dn() self.configuration_dn = self.find_configurationdn(self.ldb_admin) self.schema_dn = self.find_schemadn(self.ldb_admin) self.domain_sid = self.find_domain_sid(self.ldb_admin) -- cgit