summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests/python/ldap_syntaxes.py
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-19 09:07:53 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-19 12:07:06 +0100
commit8b7f23d644f2c9a0e5eeffeb2f93786c54a43afe (patch)
tree728273e656926ae18cc5a3da4cdae1cb411fa81b /source4/dsdb/tests/python/ldap_syntaxes.py
parent5855194894535c57797a0475640e50c07ed92643 (diff)
downloadsamba-8b7f23d644f2c9a0e5eeffeb2f93786c54a43afe.tar.gz
s4:dsdb tests - use even more already defined pyldb functions to retrieve NCs
Diffstat (limited to 'source4/dsdb/tests/python/ldap_syntaxes.py')
-rw-r--r--source4/dsdb/tests/python/ldap_syntaxes.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/source4/dsdb/tests/python/ldap_syntaxes.py b/source4/dsdb/tests/python/ldap_syntaxes.py
index c1dd4d546e8..6381657ae39 100644
--- a/source4/dsdb/tests/python/ldap_syntaxes.py
+++ b/source4/dsdb/tests/python/ldap_syntaxes.py
@@ -56,11 +56,6 @@ class SyntaxTests(unittest.TestCase):
except LdbError, (num, _):
self.assertEquals(num, ERR_NO_SUCH_OBJECT)
- 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):
res = self.ldb.search(base=self.base_dn, expression="(objectClass=*)", scope=SCOPE_BASE)
return ndr_unpack( security.dom_sid,res[0]["objectSid"][0])
@@ -69,7 +64,7 @@ class SyntaxTests(unittest.TestCase):
super(SyntaxTests, self).setUp()
self.ldb = ldb
self.base_dn = ldb.domain_dn()
- self.schema_dn = self.find_schemadn(ldb)
+ self.schema_dn = ldb.get_schema_basedn().get_linearized()
self._setup_dn_string_test()
self._setup_dn_binary_test()
self.domain_sid = self._find_domain_sid()