summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource4/lib/ldb/tests/python/ldap.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/lib/ldb/tests/python/ldap.py b/source4/lib/ldb/tests/python/ldap.py
index db69b47ab3..bd482b2e91 100755
--- a/source4/lib/ldb/tests/python/ldap.py
+++ b/source4/lib/ldb/tests/python/ldap.py
@@ -753,11 +753,17 @@ class BasicTests(unittest.TestCase):
"objectclass": "group",
"name": "ldaptestgroupx"})
+ # proof if the name has been set correctly
+ res = ldb.search("cn=ldaptestgroup,cn=users," + self.base_dn,
+ scope=SCOPE_BASE, attrs=["name"])
+ self.assertTrue(len(res) == 1)
+ self.assertTrue("name" in res[0])
+ self.assertTrue(res[0]["name"][0] == "ldaptestgroup")
+
m = Message()
m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn)
m["name"] = MessageElement("cn=ldaptestuser", FLAG_MOD_REPLACE,
"name")
-
try:
ldb.modify(m)
self.fail()
@@ -768,7 +774,6 @@ class BasicTests(unittest.TestCase):
m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn)
m["cn"] = MessageElement("ldaptestuser",
FLAG_MOD_REPLACE, "cn")
-
try:
ldb.modify(m)
self.fail()