summaryrefslogtreecommitdiffstats
path: root/ipalib/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/tests')
-rw-r--r--ipalib/tests/test_crud.py3
-rw-r--r--ipalib/tests/test_frontend.py8
-rw-r--r--ipalib/tests/test_plugable.py4
3 files changed, 9 insertions, 6 deletions
diff --git a/ipalib/tests/test_crud.py b/ipalib/tests/test_crud.py
index 8b1e8a86..e95fe509 100644
--- a/ipalib/tests/test_crud.py
+++ b/ipalib/tests/test_crud.py
@@ -22,10 +22,11 @@ Unit tests for `ipalib.crud` module.
"""
from tstutil import read_only, raises, ClassChecker
-from ipalib import crud, frontend, plugable
+from ipalib import crud, frontend, plugable, config
def get_api():
api = plugable.API(
+ config.default_environment(),
frontend.Object,
frontend.Method,
frontend.Property,
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,
diff --git a/ipalib/tests/test_plugable.py b/ipalib/tests/test_plugable.py
index 95d3825f..9be6b343 100644
--- a/ipalib/tests/test_plugable.py
+++ b/ipalib/tests/test_plugable.py
@@ -742,7 +742,7 @@ def test_API():
def method(self, n):
return n + 1
- api = plugable.API(base0, base1)
+ api = plugable.API(dict(), base0, base1)
r = api.register
assert isinstance(r, plugable.Registrar)
assert read_only(api, 'register') is r
@@ -800,7 +800,7 @@ def test_API():
# Test with base class that doesn't request a proxy
class NoProxy(plugable.Plugin):
__proxy__ = False
- api = plugable.API(NoProxy)
+ api = plugable.API(dict(), NoProxy)
class plugin0(NoProxy):
pass
api.register(plugin0)