From 48a278047db50f919a45ef82a57a6983804ed523 Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Wed, 28 Jan 2009 21:21:56 -0700 Subject: Mostly got the test_xmlrpc/ tests working again --- ipalib/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ipalib/__init__.py') diff --git a/ipalib/__init__.py b/ipalib/__init__.py index 5da7de82..f82c4dc7 100644 --- a/ipalib/__init__.py +++ b/ipalib/__init__.py @@ -870,6 +870,7 @@ freeIPA.org: ''' +import os import plugable from backend import Backend from frontend import Command, LocalOrRemote, Application @@ -908,7 +909,11 @@ def create_api(mode='dummy'): ) if mode is not None: api.env.mode = mode + assert mode != 'production' return api - api = create_api(mode=None) + +if os.environ.get('IPA_UNIT_TEST_MODE', None) == 'cli_test': + api.bootstrap(context='cli', in_server=False) + api.finalize() -- cgit