summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests/python
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-11 09:17:08 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-11 09:17:08 +0200
commitace9bd6560fcbd918ea38e6541137bbfe99da73c (patch)
tree4aea492a87639a87ffca2eeabe6624c0c308dad8 /source4/lib/ldb/tests/python
parent4d3362776f72407e8609144d2801ba067485a261 (diff)
downloadsamba-ace9bd6560fcbd918ea38e6541137bbfe99da73c.tar.gz
samba-ace9bd6560fcbd918ea38e6541137bbfe99da73c.tar.bz2
samba-ace9bd6560fcbd918ea38e6541137bbfe99da73c.zip
s4:ldap.py - check if the "name" of an entry was really ignored
Diffstat (limited to 'source4/lib/ldb/tests/python')
-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()