summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests/python
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-02-15 14:47:28 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-02-15 16:10:15 +0100
commitfa36577ae125a9043edcc896333d97b21280489d (patch)
tree8279bd267e5403de064dfd32778a30e6c0109399 /source4/dsdb/tests/python
parent0085d6e21a131c76cef76d468bfed4fe5ece4eb6 (diff)
downloadsamba-fa36577ae125a9043edcc896333d97b21280489d.tar.gz
samba-fa36577ae125a9043edcc896333d97b21280489d.tar.bz2
samba-fa36577ae125a9043edcc896333d97b21280489d.zip
s4:sam.py - add another "description" test case
Exactly for the syntax which is needed by Volker in s3's "pdb_ads". Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Tue Feb 15 16:10:15 CET 2011 on sn-devel-104
Diffstat (limited to 'source4/dsdb/tests/python')
-rwxr-xr-xsource4/dsdb/tests/python/sam.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/dsdb/tests/python/sam.py b/source4/dsdb/tests/python/sam.py
index a623ebc384..5f7c90db23 100755
--- a/source4/dsdb/tests/python/sam.py
+++ b/source4/dsdb/tests/python/sam.py
@@ -2365,6 +2365,19 @@ class SamTests(unittest.TestCase):
self.assertTrue(len(res[0]["description"]) == 1)
self.assertEquals(res[0]["description"][0], "desc1")
+ m = Message()
+ m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn)
+ m.add(MessageElement("desc1", FLAG_MOD_DELETE, "description"))
+ m.add(MessageElement("desc2", FLAG_MOD_ADD, "description"))
+ ldb.modify(m)
+
+ res = ldb.search("cn=ldaptestgroup,cn=users," + self.base_dn,
+ scope=SCOPE_BASE, attrs=["description"])
+ self.assertTrue(len(res) == 1)
+ self.assertTrue("description" in res[0])
+ self.assertTrue(len(res[0]["description"]) == 1)
+ self.assertEquals(res[0]["description"][0], "desc2")
+
delete_force(self.ldb, "cn=ldaptestgroup,cn=users," + self.base_dn)