From aa0a06f13c44e0eca0b3f2f0c34f0f7995b87159 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 23 Dec 2007 19:19:41 -0600 Subject: r26570: - Trim size of the swig-generated Python bindings by removing a bunch of {}'s. - Start working on Python equivalents for various EJS tests. - Fix regression in argument order for reg_diff_apply() in EJS bindings. (This used to be commit c550c03372cb260b78f6a6c132e70571bc4cb852) --- source4/lib/ldb/tests/python/api.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source4/lib/ldb/tests/python/api.py') diff --git a/source4/lib/ldb/tests/python/api.py b/source4/lib/ldb/tests/python/api.py index c280a3f3c4..d9dfce8718 100755 --- a/source4/lib/ldb/tests/python/api.py +++ b/source4/lib/ldb/tests/python/api.py @@ -52,6 +52,10 @@ class SimpleLdb(unittest.TestCase): l = ldb.Ldb("foo.tdb") self.assertEquals(len(l.search(ldb.Dn(l, ""), ldb.SCOPE_SUBTREE, "(dc=*)", ["dc"])), 0) + def test_search_string_dn(self): + l = ldb.Ldb("foo.tdb") + self.assertEquals(len(l.search("", ldb.SCOPE_SUBTREE, "(dc=*)", ["dc"])), 0) + def test_opaque(self): l = ldb.Ldb("foo.tdb") l.set_opaque("my_opaque", l) @@ -142,6 +146,19 @@ class SimpleLdb(unittest.TestCase): finally: l.delete(ldb.Dn(l, "dc=bar")) + def test_rename_string_dns(self): + l = ldb.Ldb("foo.tdb") + m = ldb.Message() + m.dn = ldb.Dn(l, "dc=foo") + m["bla"] = "bla" + self.assertEquals(len(l.search()), 1) + l.add(m) + try: + l.rename("dc=foo", "dc=bar") + self.assertEquals(len(l.search()), 2) + finally: + l.delete(ldb.Dn(l, "dc=bar")) + def test_modify_delete(self): l = ldb.Ldb("foo.tdb") m = ldb.Message() -- cgit