diff options
author | Jan Cholasta <jcholast@redhat.com> | 2015-06-22 10:16:34 +0000 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-07-01 13:05:30 +0000 |
commit | 2d1515323acb4125306817096bafab6623de0b47 (patch) | |
tree | 5f9c347978fe2c94eb0b0f3996ff7a79d3e848db /ipatests/test_ipalib/test_backend.py | |
parent | 481f8ddaa32795c64275438645e45d2c4bbbae26 (diff) | |
download | freeipa-2d1515323acb4125306817096bafab6623de0b47.tar.gz freeipa-2d1515323acb4125306817096bafab6623de0b47.tar.xz freeipa-2d1515323acb4125306817096bafab6623de0b47.zip |
plugable: Load plugins only from modules imported by API
Previously all plugin modules imported from anywhere were added to the API.
https://fedorahosted.org/freeipa/ticket/3090
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Diffstat (limited to 'ipatests/test_ipalib/test_backend.py')
-rw-r--r-- | ipatests/test_ipalib/test_backend.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ipatests/test_ipalib/test_backend.py b/ipatests/test_ipalib/test_backend.py index 121c4745b..91eb92057 100644 --- a/ipatests/test_ipalib/test_backend.py +++ b/ipatests/test_ipalib/test_backend.py @@ -186,7 +186,7 @@ class test_Executioner(ClassChecker): def execute(self, *args, **options): assert type(args[1]) is tuple return dict(result=args + (options,)) - api.register(echo) + api.add_plugin(echo) class good(Command): def execute(self, **options): @@ -194,12 +194,12 @@ class test_Executioner(ClassChecker): name='nurse', error=u'Not naughty!', ) - api.register(good) + api.add_plugin(good) class bad(Command): def execute(self, **options): raise ValueError('This is private.') - api.register(bad) + api.add_plugin(bad) class with_name(Command): """ @@ -208,7 +208,7 @@ class test_Executioner(ClassChecker): takes_options = 'name' def execute(self, **options): return dict(result=options['name'].upper()) - api.register(with_name) + api.add_plugin(with_name) api.finalize() o = self.cls() |