summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-11-30 18:39:58 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-12-01 12:17:00 +1100
commitf65360840a43616d870b0f26925067f248aa6376 (patch)
tree57c586aef4b7f0fd602beb7084df598f981aa602 /source4/lib
parentce86fdfed9f7b9b5012f02210aaa1c5bf6ffcdf1 (diff)
downloadsamba-f65360840a43616d870b0f26925067f248aa6376.tar.gz
samba-f65360840a43616d870b0f26925067f248aa6376.tar.bz2
samba-f65360840a43616d870b0f26925067f248aa6376.zip
s4:ldap.py Add test of namingContext behaviour after tridge found a bug
Tridge found that the partitions.c module was being initialised twice, and setting the partitions into the rootDSE twice. Andrew Bartlett
Diffstat (limited to 'source4/lib')
-rwxr-xr-xsource4/lib/ldb/tests/python/ldap.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/source4/lib/ldb/tests/python/ldap.py b/source4/lib/ldb/tests/python/ldap.py
index 0292422741..384e69e9bd 100755
--- a/source4/lib/ldb/tests/python/ldap.py
+++ b/source4/lib/ldb/tests/python/ldap.py
@@ -1923,6 +1923,21 @@ class BaseDnTests(unittest.TestCase):
attrs=["netlogon", "highestCommittedUSN"])
self.assertEquals(len(res), 0)
+ def test_namingContexts(self):
+ """Testing for namingContexts in rootDSE"""
+ res = self.ldb.search("", scope=SCOPE_BASE,
+ attrs=["namingContexts", "defaultNamingContext", "schemaNamingContext", "configurationNamingContext"])
+ self.assertEquals(len(res), 1)
+
+ ncs = set([])
+ for nc in res[0]["namingContexts"]:
+ self.assertTrue(nc not in ncs)
+ ncs.add(nc)
+
+ self.assertTrue(res[0]["defaultNamingContext"][0] in ncs)
+ self.assertTrue(res[0]["configurationNamingContext"][0] in ncs)
+ self.assertTrue(res[0]["schemaNamingContext"][0] in ncs)
+
class SchemaTests(unittest.TestCase):
def delete_force(self, ldb, dn):
try: