From 9a9202e7bdd2e20e6a4aa719515438271ef82c75 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Wed, 23 Sep 2009 00:51:25 +0400 Subject: pythonbindings: allow add() to have an array of controls as second parameter Signed-off-by: Jelmer Vernooij --- source4/lib/ldb/tests/python/api.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4/lib/ldb/tests') 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"), -- cgit