From f992dbb9cade1a5ef6ee03f0ea5c378928be3b64 Mon Sep 17 00:00:00 2001 From: Nadezhda Ivanova Date: Thu, 18 Nov 2010 20:44:22 +0200 Subject: s4-tests: Modified descriptor tests to use pyldb api to retrieve configuration and schema dn. Autobuild-User: Nadezhda Ivanova Autobuild-Date: Thu Nov 18 22:25:07 CET 2010 on sn-devel-104 --- source4/dsdb/tests/python/sec_descriptor.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'source4/dsdb/tests/python/sec_descriptor.py') diff --git a/source4/dsdb/tests/python/sec_descriptor.py b/source4/dsdb/tests/python/sec_descriptor.py index 175cc816cf..b61afd3b2e 100755 --- a/source4/dsdb/tests/python/sec_descriptor.py +++ b/source4/dsdb/tests/python/sec_descriptor.py @@ -65,16 +65,6 @@ class DescriptorTests(samba.tests.TestCase): except LdbError, (num, _): self.assertEquals(num, ERR_NO_SUCH_OBJECT) - def find_configurationdn(self, ldb): - res = ldb.search(base="", expression="", scope=SCOPE_BASE, attrs=["configurationNamingContext"]) - self.assertEquals(len(res), 1) - return res[0]["configurationNamingContext"][0] - - def find_schemadn(self, ldb): - res = ldb.search(base="", expression="", scope=SCOPE_BASE, attrs=["schemaNamingContext"]) - self.assertEquals(len(res), 1) - return res[0]["schemaNamingContext"][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]) @@ -263,8 +253,8 @@ url: www.example.com super(DescriptorTests, self).setUp() self.ldb_admin = ldb 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.configuration_dn = self.ldb_admin.get_config_basedn().get_linearized() + self.schema_dn = self.ldb_admin.get_schema_basedn().get_linearized() self.domain_sid = self.find_domain_sid(self.ldb_admin) print "baseDN: %s" % self.base_dn -- cgit