From 96c5551aceb01f524302714b40547ae5050f675e Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Tue, 13 Mar 2012 07:10:52 -0400 Subject: Add CLI parsing tests These test that command lines are parsed to correct Command arguments. Includes some tests for interactive prompts. To make this possible cli.run is broken up into several pieces. --- ipalib/__init__.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ipalib/__init__.py') diff --git a/ipalib/__init__.py b/ipalib/__init__.py index 1efeeab4..dd861a82 100644 --- a/ipalib/__init__.py +++ b/ipalib/__init__.py @@ -916,5 +916,8 @@ def create_api(mode='dummy'): api = create_api(mode=None) if os.environ.get('IPA_UNIT_TEST_MODE', None) == 'cli_test': + from cli import cli_plugins + for klass in cli_plugins: + api.register(klass) api.bootstrap(context='cli', in_server=False, in_tree=True) api.finalize() -- cgit