summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-01-03 19:43:52 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-01-05 20:55:32 +0100
commitd8ca002a8c7b56712aeaadc19885f70d762ac059 (patch)
treef3b6be30d21551180818dde74fee04ab00841c7d
parentd06fb8e02706559e91c6d185427409bb093bb896 (diff)
downloadsamba-d8ca002a8c7b56712aeaadc19885f70d762ac059.tar.gz
samba-d8ca002a8c7b56712aeaadc19885f70d762ac059.tar.bz2
samba-d8ca002a8c7b56712aeaadc19885f70d762ac059.zip
s4:ldap_schema.py - Move generated attributes check
Make more clear that they're created before the "schemaUpdateNow".
-rwxr-xr-xsource4/lib/ldb/tests/python/ldap_schema.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/source4/lib/ldb/tests/python/ldap_schema.py b/source4/lib/ldb/tests/python/ldap_schema.py
index 0a31db82f7..9dd9240414 100755
--- a/source4/lib/ldb/tests/python/ldap_schema.py
+++ b/source4/lib/ldb/tests/python/ldap_schema.py
@@ -132,6 +132,13 @@ systemOnly: FALSE
"""
self.ldb.add_ldif(ldif)
+ # Search for created attribute
+ res = []
+ res = self.ldb.search("cn=%s,%s" % (attr_name, self.schema_dn), scope=SCOPE_BASE, attrs=["*"])
+ self.assertEquals(len(res), 1)
+ self.assertEquals(res[0]["lDAPDisplayName"][0], attr_ldap_display_name)
+ self.assertTrue("schemaIDGUID" in res[0])
+
class_name = "test-Class" + time.strftime("%s", time.gmtime())
class_ldap_display_name = class_name.replace("-", "")
@@ -154,6 +161,14 @@ systemOnly: FALSE
"""
self.ldb.add_ldif(ldif)
+ # Search for created objectclass
+ res = []
+ res = self.ldb.search("cn=%s,%s" % (class_name, self.schema_dn), scope=SCOPE_BASE, attrs=["*"])
+ self.assertEquals(len(res), 1)
+ self.assertEquals(res[0]["lDAPDisplayName"][0], class_ldap_display_name)
+ self.assertEquals(res[0]["defaultObjectCategory"][0], res[0]["distinguishedName"][0])
+ self.assertTrue("schemaIDGUID" in res[0])
+
ldif = """
dn:
changetype: modify
@@ -179,21 +194,6 @@ name: """ + object_name + """
"""
self.ldb.add_ldif(ldif)
- # Search for created attribute
- res = []
- res = self.ldb.search("cn=%s,%s" % (attr_name, self.schema_dn), scope=SCOPE_BASE, attrs=["*"])
- self.assertEquals(len(res), 1)
- self.assertEquals(res[0]["lDAPDisplayName"][0], attr_ldap_display_name)
- self.assertTrue("schemaIDGUID" in res[0])
-
- # Search for created objectclass
- res = []
- res = self.ldb.search("cn=%s,%s" % (class_name, self.schema_dn), scope=SCOPE_BASE, attrs=["*"])
- self.assertEquals(len(res), 1)
- self.assertEquals(res[0]["lDAPDisplayName"][0], class_ldap_display_name)
- self.assertEquals(res[0]["defaultObjectCategory"][0], res[0]["distinguishedName"][0])
- self.assertTrue("schemaIDGUID" in res[0])
-
# Search for created object
res = []
res = self.ldb.search("cn=%s,cn=Users,%s" % (object_name, self.base_dn), scope=SCOPE_BASE, attrs=["*"])