diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-10-30 01:34:46 -0600 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-10-30 01:34:46 -0600 |
commit | 2fee6a3e20169f12b837647f0f71d6f28937490f (patch) | |
tree | f84fc2ad8486a70ba51be6cd36214ab9dc6ac53f /ipalib/__init__.py | |
parent | ddb5449c7faabbd4c1b71adfe84c386b943a163f (diff) | |
download | freeipa-2fee6a3e20169f12b837647f0f71d6f28937490f.tar.gz freeipa-2fee6a3e20169f12b837647f0f71d6f28937490f.tar.xz freeipa-2fee6a3e20169f12b837647f0f71d6f28937490f.zip |
Added tests.util.get_api() function to create a standard (api, home) tuple for unit testing
Diffstat (limited to 'ipalib/__init__.py')
-rw-r--r-- | ipalib/__init__.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ipalib/__init__.py b/ipalib/__init__.py index a6664f73b..5cc4c1214 100644 --- a/ipalib/__init__.py +++ b/ipalib/__init__.py @@ -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() |