summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-09-20 15:06:26 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-09-20 15:06:26 +0200
commit0e2928f94651c53d653a3ad83bbda5608b4d4c24 (patch)
treebd3583089c1ba57819bac412f25a1ede899f15f1 /source4/lib/ldb/tests
parente42caab6f91369a981619d0b711071cd1c724d5d (diff)
downloadsamba-0e2928f94651c53d653a3ad83bbda5608b4d4c24.tar.gz
samba-0e2928f94651c53d653a3ad83bbda5608b4d4c24.tar.bz2
samba-0e2928f94651c53d653a3ad83bbda5608b4d4c24.zip
Don't expose ldb_request in the Python API but rather use regular
parameters.
Diffstat (limited to 'source4/lib/ldb/tests')
-rwxr-xr-xsource4/lib/ldb/tests/python/api.py11
1 files changed, 8 insertions, 3 deletions
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 <jelmer@samba.org>
-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)