summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-11-24 10:18:33 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-11-24 10:39:10 +1100
commitcec473e72826af09fdf84eee2731ad0c2b193dfc (patch)
treec564537a3bc06221249153ab5f6a805c8c573fd6 /source4/lib
parentcfad782c9e422f11d6faa5a7e2b1b94400fe04bc (diff)
downloadsamba-cec473e72826af09fdf84eee2731ad0c2b193dfc.tar.gz
samba-cec473e72826af09fdf84eee2731ad0c2b193dfc.tar.bz2
samba-cec473e72826af09fdf84eee2731ad0c2b193dfc.zip
s4:ldap.py Add tests for subSchemaSubEntry
Diffstat (limited to 'source4/lib')
-rwxr-xr-xsource4/lib/ldb/tests/python/ldap.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/lib/ldb/tests/python/ldap.py b/source4/lib/ldb/tests/python/ldap.py
index 94bdf7e37d..52f3947b8d 100755
--- a/source4/lib/ldb/tests/python/ldap.py
+++ b/source4/lib/ldb/tests/python/ldap.py
@@ -819,6 +819,18 @@ objectClass: container
res2 = self.ldb.search(scope=SCOPE_BASE, attrs=["wellKnownObjects"], expression=("wellKnownObjects=%s") % res[0].dn)
self.assertEquals(len(res2), 0)
+ def test_subschemasubentry(self):
+ """Test subSchemaSubEntry appears when requested, but not when not requested"""
+ print "Test subSchemaSubEntry"""
+
+ res = self.ldb.search(base=self.base_dn, scope=SCOPE_BASE, attrs=["subSchemaSubEntry"])
+ self.assertEquals(len(res), 1)
+ self.assertEquals(res[0]["subSchemaSubEntry"][0], "CN=Aggregate,"+self.schema_dn)
+
+ res = self.ldb.search(base=self.base_dn, scope=SCOPE_BASE, attrs=["*"])
+ self.assertEquals(len(res), 1)
+ self.assertTrue("subScheamSubEntry" not in res[0])
+
def test_all(self):
"""Basic tests"""