diff options
author | Martin Nagy <mnagy@redhat.com> | 2008-09-29 17:41:30 +0200 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-29 17:45:14 -0600 |
commit | afdc72103847fc27efd00f8cc97a7320909ff6a0 (patch) | |
tree | 0e2bf04bb5d483b96ee43b218e759986d9af7b06 /ipalib/tests/test_frontend.py | |
parent | d77907d2d0ecc33ef4ee4121e10cfef385172b0d (diff) | |
download | freeipa.git-afdc72103847fc27efd00f8cc97a7320909ff6a0.tar.gz freeipa.git-afdc72103847fc27efd00f8cc97a7320909ff6a0.tar.xz freeipa.git-afdc72103847fc27efd00f8cc97a7320909ff6a0.zip |
Add support for environment variables, change tests accordingly
Diffstat (limited to 'ipalib/tests/test_frontend.py')
-rw-r--r-- | ipalib/tests/test_frontend.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ipalib/tests/test_frontend.py b/ipalib/tests/test_frontend.py index f0ada896..e3dd04fa 100644 --- a/ipalib/tests/test_frontend.py +++ b/ipalib/tests/test_frontend.py @@ -23,7 +23,7 @@ Unit tests for `ipalib.frontend` module. from tstutil import raises, getitem, no_set, no_del, read_only, ClassChecker from tstutil import check_TypeError -from ipalib import frontend, backend, plugable, errors, ipa_types +from ipalib import frontend, backend, plugable, errors, ipa_types, config def test_RULE_FLAG(): @@ -732,7 +732,7 @@ class test_Command(ClassChecker): kw = dict(how_are='you', on_this='fine day?') # Test in server context: - api = plugable.API(self.cls, in_server_context=True) + api = plugable.API(dict(server_context=True), self.cls) api.finalize() o = my_cmd() o.set_api(api) @@ -741,7 +741,7 @@ class test_Command(ClassChecker): assert o.run.im_func is my_cmd.execute.im_func # Test in non-server context - api = plugable.API(self.cls, in_server_context=False) + api = plugable.API(dict(server_context=False), self.cls) api.finalize() o = my_cmd() o.set_api(api) @@ -868,6 +868,7 @@ class test_Object(ClassChecker): Test the `frontend.Object.primary_key` attribute. """ api = plugable.API( + config.default_environment(), frontend.Method, frontend.Property, ) @@ -922,6 +923,7 @@ class test_Object(ClassChecker): Test the `frontend.Object.backend` attribute. """ api = plugable.API( + config.default_environment(), frontend.Object, frontend.Method, frontend.Property, |