[PATCH 4/4] s4 python: Update unit tests related to create secrets
Matthieu Patou
mat at matws.net
Thu May 6 18:22:36 MDT 2010
---
source4/scripting/python/samba/tests/provision.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/source4/scripting/python/samba/tests/provision.py b/source4/scripting/python/samba/tests/provision.py
index 45c237f..77412fb 100644
--- a/source4/scripting/python/samba/tests/provision.py
+++ b/source4/scripting/python/samba/tests/provision.py
@@ -29,6 +29,18 @@ def setup_path(file):
return os.path.join(setup_dir, file)
+def create_dummy_secretsdb(path, lp=None):
+ """Create a dummy secrets database for use in tests.
+
+ :param path: Path to store the secrets db
+ :param lp: Optional loadparm context. A simple one will
+ be generated if not specified.
+ """
+ if lp is None:
+ lp = samba.tests.cmdline_loadparm
+ return setup_secretsdb(path, setup_path, None, None, lp=lp)
+
+
class ProvisionTestCase(samba.tests.TestCaseInTempDir):
"""Some simple tests for individual functions in the provisioning code.
"""
--
1.7.0.4
--------------050001030301000908040904
Content-Type: text/x-patch;
name="0002-s4-python-add-more-unit-tests-to-verify-the-compare-.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-s4-python-add-more-unit-tests-to-verify-the-compare-.pa";
filename*1="tch"
More information about the samba-technical
mailing list