diff options
Diffstat (limited to 'ipalib/__init__.py')
-rw-r--r-- | ipalib/__init__.py | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/ipalib/__init__.py b/ipalib/__init__.py index 4593e581..a6664f73 100644 --- a/ipalib/__init__.py +++ b/ipalib/__init__.py @@ -30,15 +30,18 @@ To learn about the ``ipalib`` library, you should read the code in this order: """ import plugable -import frontend -import backend -import config - -api = plugable.API( - frontend.Command, - frontend.Object, - frontend.Method, - frontend.Property, - frontend.Application, - backend.Backend, -) +from backend import Backend, Context +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( + Command, Object, Method, Property, Application, + Backend, Context, + ) + if unit_test is True: + api.env.mode = 'unit_test' + return api + +api = get_standard_api() |