From 6857bbc8997b2afb89a83f072c090129533b17c8 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Wed, 22 Dec 2010 11:57:31 +0100 Subject: dsdb:ldap.py - transform a test call into the new "msg.add" syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Autobuild-User: Matthias Dieter Wallnöfer Autobuild-Date: Wed Dec 22 13:05:53 CET 2010 on sn-devel-104 --- source4/dsdb/tests/python/ldap.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'source4') diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py index 810289e22c..6972ce3c8f 100755 --- a/source4/dsdb/tests/python/ldap.py +++ b/source4/dsdb/tests/python/ldap.py @@ -276,14 +276,11 @@ class BasicTests(unittest.TestCase): self.assertEquals(num, ERR_OBJECT_CLASS_VIOLATION) # More than one change operation is allowed - ldb.modify_ldif(""" -dn: cn=ldaptestuser,cn=users, """ + self.base_dn + """ -changetype: modify -delete: objectClass -objectClass: bootableDevice -add: objectClass -objectClass: bootableDevice -""") + m = Message() + m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) + m.add(MessageElement("bootableDevice", FLAG_MOD_DELETE, "objectClass")) + m.add(MessageElement("bootableDevice", FLAG_MOD_ADD, "objectClass")) + ldb.modify(m) # We cannot remove all object classes by an empty replace m = Message() -- cgit