salt/tests/modules/__init__.py
Martin Schnabel 43a6bcf299 add simple test runner.
use:
   python setup.py test
to build salt and run all 'unittest.TestCase's in tests/
2011-12-30 00:55:05 +01:00

14 lines
315 B
Python

from salt.cli.caller import Caller
from salt.config import minion_config
defaults = {
'module_dirs': '',
'log_level': 'warning',
}
config = minion_config('/etc/salt/minion')
def run_module(name, *args):
opts = defaults.copy()
opts.update(config, fun=name, arg=args)
return Caller(opts).call()