Added tests.util.get_api() function to create a standard (api, home) tuple for unit testing

This commit is contained in:
Jason Gerard DeRose
2008-10-30 01:34:46 -06:00
parent ddb5449c7f
commit 2fee6a3e20
4 changed files with 29 additions and 32 deletions

View File

@@ -35,13 +35,11 @@ from frontend import Command, Object, Method, Property, Application
from ipa_types import Bool, Int, Unicode, Enum
from frontend import Param, DefaultFrom
def get_standard_api(unit_test=False):
api = plugable.API(
def get_standard_api():
return plugable.API(
Command, Object, Method, Property, Application,
Backend, Context,
)
if unit_test is True:
api.env.mode = 'unit_test'
return api
api = get_standard_api()