summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource4/dsdb/tests/python/ldap.py13
1 files changed, 5 insertions, 8 deletions
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()