diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-10-27 23:39:43 -0600 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-10-27 23:39:43 -0600 |
commit | 83d6c95e4636049a5bcedb533ad49f6e2cf79dfe (patch) | |
tree | 4e89cfb19c8f68557ebb2e49005d3643dc1e5433 /tests/test_ipalib | |
parent | 6e456cc7494bc00e905361f3e6d42dff99089c6b (diff) | |
download | freeipa-83d6c95e4636049a5bcedb533ad49f6e2cf79dfe.tar.gz freeipa-83d6c95e4636049a5bcedb533ad49f6e2cf79dfe.tar.xz freeipa-83d6c95e4636049a5bcedb533ad49f6e2cf79dfe.zip |
API.load_plugins() no longer takes dry_run=False kwarg and instead checks in env.mode == 'unit_test' to decide whether to load the plugins; it also only loads ipa_server.plugins in env.in_server is True
Diffstat (limited to 'tests/test_ipalib')
-rw-r--r-- | tests/test_ipalib/test_cli.py | 2 | ||||
-rw-r--r-- | tests/test_ipalib/test_plugable.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_ipalib/test_cli.py b/tests/test_ipalib/test_cli.py index c4740875b..7b3239d7c 100644 --- a/tests/test_ipalib/test_cli.py +++ b/tests/test_ipalib/test_cli.py @@ -110,7 +110,7 @@ class test_CLI(ClassChecker): frontend.Application, backend.Backend, ) - api.env.mode = 'unit-test' + api.env.mode = 'unit_test' api.env.in_tree = True o = self.cls(api, argv) assert o.api is api diff --git a/tests/test_ipalib/test_plugable.py b/tests/test_ipalib/test_plugable.py index 85b5303c1..c7b8abbd9 100644 --- a/tests/test_ipalib/test_plugable.py +++ b/tests/test_ipalib/test_plugable.py @@ -774,6 +774,7 @@ class test_API(ClassChecker): def new(self, *bases): home = TempHome() api = self.cls(*bases) + api.env.mode = 'unit_test' api.env.in_tree = True return (api, home) @@ -899,10 +900,10 @@ class test_API(ClassChecker): """ Test the `ipalib.plugable.API.load_plugins` method. """ - o = self.cls() + (o, home) = self.new() assert o.isdone('bootstrap') is False assert o.isdone('load_plugins') is False - o.load_plugins(dry_run=True) + o.load_plugins() assert o.isdone('bootstrap') is True assert o.isdone('load_plugins') is True e = raises(StandardError, o.load_plugins) |