diff options
Diffstat (limited to 'source4/lib/ldb/tests/python/ldap.py')
-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 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: |