From 98d4644bff67a6545cada8364c84b43e2a99fe62 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 3 Feb 2009 15:03:17 -0500 Subject: Fix remaining issues with XML-RPC test cases Tied the make-test script into the test target of the top-level Makefile Added code to xmlrpc_test.py so that it configures the API if it isn't already done which enables individual tests to be executed. --- tests/test_xmlrpc/xmlrpc_test.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/test_xmlrpc/xmlrpc_test.py') diff --git a/tests/test_xmlrpc/xmlrpc_test.py b/tests/test_xmlrpc/xmlrpc_test.py index 1070196e..8e626600 100644 --- a/tests/test_xmlrpc/xmlrpc_test.py +++ b/tests/test_xmlrpc/xmlrpc_test.py @@ -26,7 +26,20 @@ import socket import nose from ipalib import api, request from ipalib import errors2 +from ipalib import errors +# Initialize the API. We do this here so that one can run the tests +# individually instead of at the top-level. If API.bootstrap() +# has already been called we continue gracefully. Other errors will be +# raised. +try: + api.bootstrap(context='cli') + api.finalize() +except StandardError, e: + if str(e) == "API.bootstrap() already called": + pass + else: + raise e class XMLRPC_test(object): """ -- cgit