diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-06-11 09:17:08 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-06-11 09:17:08 +0200 |
commit | ace9bd6560fcbd918ea38e6541137bbfe99da73c (patch) | |
tree | 4aea492a87639a87ffca2eeabe6624c0c308dad8 | |
parent | 4d3362776f72407e8609144d2801ba067485a261 (diff) | |
download | samba-ace9bd6560fcbd918ea38e6541137bbfe99da73c.tar.gz samba-ace9bd6560fcbd918ea38e6541137bbfe99da73c.tar.bz2 samba-ace9bd6560fcbd918ea38e6541137bbfe99da73c.zip |
s4:ldap.py - check if the "name" of an entry was really ignored
-rwxr-xr-x | source4/lib/ldb/tests/python/ldap.py | 9 |
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() |