diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-11-30 18:39:58 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-12-01 12:17:00 +1100 |
commit | f65360840a43616d870b0f26925067f248aa6376 (patch) | |
tree | 57c586aef4b7f0fd602beb7084df598f981aa602 | |
parent | ce86fdfed9f7b9b5012f02210aaa1c5bf6ffcdf1 (diff) | |
download | samba-f65360840a43616d870b0f26925067f248aa6376.tar.gz samba-f65360840a43616d870b0f26925067f248aa6376.tar.xz 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
-rwxr-xr-x | source4/lib/ldb/tests/python/ldap.py | 15 |
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 02924227413..384e69e9bdc 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: |