summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests/python/ldap.py
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb/tests/python/ldap.py')
-rwxr-xr-xsource4/dsdb/tests/python/ldap.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py
index 0ac57d5247..00cc450109 100755
--- a/source4/dsdb/tests/python/ldap.py
+++ b/source4/dsdb/tests/python/ldap.py
@@ -310,18 +310,15 @@ class BasicTests(unittest.TestCase):
except LdbError, (num, _):
self.assertEquals(num, ERR_OBJECT_CLASS_VIOLATION)
- # More than one change operation is not allowed
- m = Message()
- m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn)
- m["objectClass"] = MessageElement("bootableDevice", FLAG_MOD_DELETE,
- "objectClass")
- m["objectClass"] = MessageElement("bootableDevice", FLAG_MOD_ADD,
- "objectClass")
- try:
- ldb.modify(m)
- self.fail()
- except LdbError, (num, _):
- self.assertEquals(num, ERR_ATTRIBUTE_OR_VALUE_EXISTS)
+ # 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
+""")
# We cannot remove all object classes by an empty replace
m = Message()