summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2009-09-23 00:51:25 +0400
committerJelmer Vernooij <jelmer@samba.org>2009-09-26 01:31:38 +0200
commit9a9202e7bdd2e20e6a4aa719515438271ef82c75 (patch)
treefb599410640f96a35ff3614ab86677aaf85f26ce /source4/lib/ldb/tests
parent76d836570e22c8916a00c723d86eb3be3d706223 (diff)
downloadsamba-9a9202e7bdd2e20e6a4aa719515438271ef82c75.tar.gz
samba-9a9202e7bdd2e20e6a4aa719515438271ef82c75.tar.bz2
samba-9a9202e7bdd2e20e6a4aa719515438271ef82c75.zip
pythonbindings: allow add() to have an array of controls as second parameter
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'source4/lib/ldb/tests')
-rwxr-xr-xsource4/lib/ldb/tests/python/api.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/lib/ldb/tests/python/api.py b/source4/lib/ldb/tests/python/api.py
index 133bd180c1..956908d7d6 100755
--- a/source4/lib/ldb/tests/python/api.py
+++ b/source4/lib/ldb/tests/python/api.py
@@ -136,6 +136,14 @@ class SimpleLdb(unittest.TestCase):
finally:
l.delete(ldb.Dn(l, "dc=foo4"))
+ def test_add_w_unhandled_ctrl(self):
+ l = ldb.Ldb(filename())
+ m = ldb.Message()
+ m.dn = ldb.Dn(l, "dc=foo4")
+ m["bla"] = "bla"
+ self.assertEquals(len(l.search()), 1)
+ self.assertRaises(ldb.LdbError, lambda: l.add(m,["search_options:1:2"]))
+
def test_add_dict(self):
l = ldb.Ldb(filename())
m = {"dn": ldb.Dn(l, "dc=foo5"),