diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-09-23 11:15:46 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-09-23 11:15:46 -0700 |
commit | 66092ced5e1dc4d35923a3c90bcb3214a885b17d (patch) | |
tree | d40fd46e86244f1b45abda2a95c8fe84bfc88c3c /source4/lib/ldb/tests/python/api.py | |
parent | 9cf29abee296ea2fcdf712687a6ce2cf9fd9d74c (diff) | |
parent | 353aaf26c5f71d9a94e799a1c1e37449211e7a87 (diff) | |
download | samba-66092ced5e1dc4d35923a3c90bcb3214a885b17d.tar.gz samba-66092ced5e1dc4d35923a3c90bcb3214a885b17d.tar.bz2 samba-66092ced5e1dc4d35923a3c90bcb3214a885b17d.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source4/lib/ldb/tests/python/api.py')
-rwxr-xr-x | source4/lib/ldb/tests/python/api.py | 11 |
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) |