From 0e2928f94651c53d653a3ad83bbda5608b4d4c24 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 20 Sep 2008 15:06:26 +0200 Subject: Don't expose ldb_request in the Python API but rather use regular parameters. --- source4/lib/ldb/tests/python/api.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (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 bc3bbc1c8c..4b3501839f 100755 --- a/source4/lib/ldb/tests/python/api.py +++ b/source4/lib/ldb/tests/python/api.py @@ -2,7 +2,7 @@ # Simple tests for the ldb python bindings. # Copyright (C) 2007 Jelmer Vernooij -import sys +import os, sys import unittest # Required for the standalone LDB build @@ -472,11 +472,16 @@ class ModuleTests(unittest.TestCase): def __init__(self, ldb, next): ops.append("init") + self.next = next + + def search(self, *args, **kwargs): + return self.next.search(*args, **kwargs) ldb.register_module(ExampleModule) + if os.path.exists("usemodule.ldb"): + os.unlink("usemodule.ldb") l = ldb.Ldb("usemodule.ldb") - l.add({"dn": "@MODULES", - "@LIST": "bla"}) + l.add({"dn": "@MODULES", "@LIST": "bla"}) self.assertEquals([], ops) l = ldb.Ldb("usemodule.ldb") self.assertEquals(["init"], ops) -- cgit