From c0538a006d5381f3bc17d90f873e791d35bbde17 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Fri, 18 Jun 2010 22:17:54 +0200 Subject: ldb:api.py - add a small test for the enhanced "py_ldb_delete" syntax --- source4/lib/ldb/tests/python/api.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source4/lib/ldb') diff --git a/source4/lib/ldb/tests/python/api.py b/source4/lib/ldb/tests/python/api.py index 4d9efb4b67..6303f6b6cb 100755 --- a/source4/lib/ldb/tests/python/api.py +++ b/source4/lib/ldb/tests/python/api.py @@ -95,6 +95,15 @@ class SimpleLdb(unittest.TestCase): l = ldb.Ldb(filename()) self.assertRaises(ldb.LdbError, lambda: l.delete(ldb.Dn(l, "dc=foo2"))) + def test_delete_w_unhandled_ctrl(self): + l = ldb.Ldb(filename()) + m = ldb.Message() + m.dn = ldb.Dn(l, "dc=foo1") + m["b"] = ["a"] + l.add(m) + self.assertRaises(ldb.LdbError, lambda: l.delete(m.dn, ["search_options:1:2"])) + l.delete(m.dn) + def test_contains(self): l = ldb.Ldb(filename()) self.assertFalse(ldb.Dn(l, "dc=foo3") in l) -- cgit