summaryrefslogtreecommitdiffstats
path: root/tests/test_ipalib/test_plugable.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_ipalib/test_plugable.py')
-rw-r--r--tests/test_ipalib/test_plugable.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/test_ipalib/test_plugable.py b/tests/test_ipalib/test_plugable.py
index ba98e752..50cab930 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'