diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-10-27 15:36:41 -0600 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-10-27 15:36:41 -0600 |
commit | bb9691099b7b025fc491279314d8803f4fa3b571 (patch) | |
tree | 3213f7065cb62d461fde16c5f6789ecd8db1a7ad /tests/test_ipalib/test_plugable.py | |
parent | e6254026fe73c423d357a2fa1489de35475da46c (diff) | |
download | freeipa-bb9691099b7b025fc491279314d8803f4fa3b571.tar.gz freeipa-bb9691099b7b025fc491279314d8803f4fa3b571.tar.xz freeipa-bb9691099b7b025fc491279314d8803f4fa3b571.zip |
API.bootstrap() now calls Env._finalize_core(); updated unit tests
Diffstat (limited to 'tests/test_ipalib/test_plugable.py')
-rw-r--r-- | tests/test_ipalib/test_plugable.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/test_ipalib/test_plugable.py b/tests/test_ipalib/test_plugable.py index ba98e752a..50cab9301 100644 --- a/tests/test_ipalib/test_plugable.py +++ b/tests/test_ipalib/test_plugable.py @@ -23,7 +23,7 @@ Test the `ipalib.plugable` module. from tests.util import raises, no_set, no_del, read_only from tests.util import getitem, setitem, delitem -from tests.util import ClassChecker +from tests.util import ClassChecker, TempHome from ipalib import plugable, errors @@ -771,6 +771,12 @@ class test_API(ClassChecker): _cls = plugable.API + def new(self, *bases): + home = TempHome() + api = self.cls(*bases) + api.env.in_tree = True + return (api, home) + def test_API(self): """ Test the `ipalib.plugable.API` class. @@ -877,10 +883,14 @@ class test_API(ClassChecker): """ Test the `ipalib.plugable.API.bootstrap` method. """ - o = self.cls() + (o, home) = self.new() + assert o.env._isdone('_bootstrap') is False + assert o.env._isdone('_finalize_core') is False assert o.isdone('bootstrap') is False o.bootstrap() assert o.isdone('bootstrap') is True + assert o.env._isdone('_bootstrap') is True + assert o.env._isdone('_finalize_core') is True e = raises(StandardError, o.bootstrap) assert str(e) == 'API.bootstrap() already called' |