diff --git a/moulinette/actionsmap.py b/moulinette/actionsmap.py index 107a0c2d..b465f33d 100644 --- a/moulinette/actionsmap.py +++ b/moulinette/actionsmap.py @@ -379,6 +379,7 @@ class ExtraArgumentParser(object): # Main class ---------------------------------------------------------- + class ActionsMap(object): """Validate and process actions defined into an actions map diff --git a/moulinette/core.py b/moulinette/core.py index 4950af35..3aa024ec 100644 --- a/moulinette/core.py +++ b/moulinette/core.py @@ -24,6 +24,7 @@ for key in env.keys(): env["NAMESPACES"] = env["NAMESPACES"].split() + def during_unittests_run(): return "TESTS_RUN" in os.environ diff --git a/moulinette/interfaces/cli.py b/moulinette/interfaces/cli.py index f5f31db2..c75b8d60 100644 --- a/moulinette/interfaces/cli.py +++ b/moulinette/interfaces/cli.py @@ -31,6 +31,7 @@ from moulinette.utils import log # But it display instead: # Error: unable to parse arguments 'firewall' because: sequence item 0: expected str instance, NoneType found + def monkey_get_action_name(argument): if argument is None: return None @@ -502,6 +503,7 @@ class Interface: if output_as: if output_as == "json": import json + print(json.dumps(ret, cls=JSONExtendedEncoder)) else: plain_print_dict(ret)