diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-12-22 11:57:31 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-12-22 13:05:53 +0100 |
commit | 6857bbc8997b2afb89a83f072c090129533b17c8 (patch) | |
tree | c7fa8ae956f957dd5d4534b17a1b3f7f50f47596 /source4/dsdb/tests | |
parent | 07bcf6197d9fbdc038513ae3db7f83a9bb8a6cd9 (diff) | |
download | samba-6857bbc8997b2afb89a83f072c090129533b17c8.tar.gz samba-6857bbc8997b2afb89a83f072c090129533b17c8.tar.bz2 samba-6857bbc8997b2afb89a83f072c090129533b17c8.zip |
dsdb:ldap.py - transform a test call into the new "msg.add" syntax
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Wed Dec 22 13:05:53 CET 2010 on sn-devel-104
Diffstat (limited to 'source4/dsdb/tests')
-rwxr-xr-x | source4/dsdb/tests/python/ldap.py | 13 |
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() |