From fa36577ae125a9043edcc896333d97b21280489d Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Tue, 15 Feb 2011 14:47:28 +0100 Subject: s4:sam.py - add another "description" test case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Exactly for the syntax which is needed by Volker in s3's "pdb_ads". Autobuild-User: Matthias Dieter Wallnöfer Autobuild-Date: Tue Feb 15 16:10:15 CET 2011 on sn-devel-104 --- source4/dsdb/tests/python/sam.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source4/dsdb') 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) -- cgit