summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests
diff options
context:
space:
mode:
authorNadezhda Ivanova <nivanova@samba.org>2010-11-18 20:44:22 +0200
committerNadezhda Ivanova <nivanova@samba.org>2010-11-18 22:25:07 +0100
commitf992dbb9cade1a5ef6ee03f0ea5c378928be3b64 (patch)
treec91a88f86d5319ce3c0c6c78fd337e7ab543644f /source4/dsdb/tests
parentb397a139203781d7df9992a821b1c6c6849c42cf (diff)
downloadsamba-f992dbb9cade1a5ef6ee03f0ea5c378928be3b64.tar.gz
samba-f992dbb9cade1a5ef6ee03f0ea5c378928be3b64.tar.bz2
samba-f992dbb9cade1a5ef6ee03f0ea5c378928be3b64.zip
s4-tests: Modified descriptor tests to use pyldb api to retrieve configuration and schema dn.
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org> Autobuild-Date: Thu Nov 18 22:25:07 CET 2010 on sn-devel-104
Diffstat (limited to 'source4/dsdb/tests')
-rwxr-xr-xsource4/dsdb/tests/python/sec_descriptor.py14
1 files changed, 2 insertions, 12 deletions
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