summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests/python/ldap_syntaxes.py
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-18 16:06:46 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-18 17:03:20 +0000
commit4c666f3e0ada47c793ecdec0e5c3dd0441a69080 (patch)
tree1c02a3252fdcadfeb5456b5c158171acafeb9801 /source4/dsdb/tests/python/ldap_syntaxes.py
parentb7dab4692200dd7f3bbc600560648b8e0ec47e70 (diff)
downloadsamba-4c666f3e0ada47c793ecdec0e5c3dd0441a69080.tar.gz
s4:dsdb python tests - use "ldb.domain_dn"
By inspiration of Nadya's patches
Diffstat (limited to 'source4/dsdb/tests/python/ldap_syntaxes.py')
-rw-r--r--source4/dsdb/tests/python/ldap_syntaxes.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/source4/dsdb/tests/python/ldap_syntaxes.py b/source4/dsdb/tests/python/ldap_syntaxes.py
index f5d2dcba163..c1dd4d546e8 100644
--- a/source4/dsdb/tests/python/ldap_syntaxes.py
+++ b/source4/dsdb/tests/python/ldap_syntaxes.py
@@ -61,12 +61,6 @@ class SyntaxTests(unittest.TestCase):
self.assertEquals(len(res), 1)
return res[0]["schemaNamingContext"][0]
- 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):
res = self.ldb.search(base=self.base_dn, expression="(objectClass=*)", scope=SCOPE_BASE)
return ndr_unpack( security.dom_sid,res[0]["objectSid"][0])
@@ -74,8 +68,8 @@ class SyntaxTests(unittest.TestCase):
def setUp(self):
super(SyntaxTests, self).setUp()
self.ldb = ldb
+ self.base_dn = ldb.domain_dn()
self.schema_dn = self.find_schemadn(ldb)
- self.base_dn = self.find_basedn(ldb)
self._setup_dn_string_test()
self._setup_dn_binary_test()
self.domain_sid = self._find_domain_sid()