Add a test.arg variant that cleans the pub kwargs by default

This commit is contained in:
Seth House 2017-07-20 14:26:30 -06:00 committed by rallytime
parent 624f63648e
commit 76fb074433

View file

@ -311,6 +311,18 @@ def arg_repr(*args, **kwargs):
return {"args": repr(args), "kwargs": repr(kwargs)}
def arg_clean(*args, **kwargs):
'''
Like test.arg but cleans kwargs of the __pub* items
CLI Example:
.. code-block:: bash
salt '*' test.arg_clean 1 "two" 3.1 txt="hello" wow='{a: 1, b: "hello"}'
'''
return dict(args=args, kwargs=salt.utils.clean_kwargs(**kwargs))
def fib(num):
'''
Return the num-th Fibonacci number, and the time it took to compute in