From cec473e72826af09fdf84eee2731ad0c2b193dfc Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 24 Nov 2009 10:18:33 +1100 Subject: s4:ldap.py Add tests for subSchemaSubEntry --- source4/lib/ldb/tests/python/ldap.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source4/lib') 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""" -- cgit