summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/cli.py2
-rw-r--r--ipalib/plugable.py7
2 files changed, 5 insertions, 4 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py
index 671d4053d..3613dfeb7 100644
--- a/ipalib/cli.py
+++ b/ipalib/cli.py
@@ -245,7 +245,7 @@ class CLI(object):
"""
self.__doing('run')
self.finalize()
- if self.api.env.mode == 'unit-test':
+ if self.api.env.mode == 'unit_test':
return
if len(self.cmd_argv) < 1:
self.print_commands()
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 6fe224299..8d689f7de 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -739,7 +739,7 @@ class API(DictProxy):
self.env._bootstrap(**overrides)
self.env._finalize_core(**dict(constants.DEFAULT_CONFIG))
- def load_plugins(self, dry_run=False):
+ def load_plugins(self):
"""
Load plugins from all standard locations.
@@ -748,10 +748,11 @@ class API(DictProxy):
"""
self.__doing('load_plugins')
self.__do_if_not_done('bootstrap')
- if dry_run:
+ if self.env.mode == 'unit_test':
return
util.import_plugins_subpackage('ipalib')
- util.import_plugins_subpackage('ipa_server')
+ if self.env.in_server:
+ util.import_plugins_subpackage('ipa_server')
def finalize(self):
"""