summaryrefslogtreecommitdiffstats
path: root/source4/lib/ldb/tests/python
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-09-21 02:32:19 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-09-21 02:32:19 +0200
commit442d31c7f699628a603ee3bef3831441b43afb69 (patch)
treede39e7e9bcc74f45ec521d663bb4321e19afb1f8 /source4/lib/ldb/tests/python
parentf63c83deef52afcbe27c1664031a5eed009f3a44 (diff)
parent0e2928f94651c53d653a3ad83bbda5608b4d4c24 (diff)
Merge branch 'master' of ssh://git.samba.org/data/git/samba into noejs
Diffstat (limited to 'source4/lib/ldb/tests/python')
-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)