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_frontend.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_frontend.py')
-rw-r--r-- | ipatests/test_ipalib/test_frontend.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ipatests/test_ipalib/test_frontend.py b/ipatests/test_ipalib/test_frontend.py index b4fbf3ea3..c47113f6e 100644 --- a/ipatests/test_ipalib/test_frontend.py +++ b/ipatests/test_ipalib/test_frontend.py @@ -817,7 +817,7 @@ class test_LocalOrRemote(ClassChecker): # Test when in_server=False: (api, home) = create_test_api(in_server=False) - api.register(example) + api.add_plugin(example) api.finalize() cmd = api.Command.example assert cmd(version=u'2.47') == dict( @@ -835,7 +835,7 @@ class test_LocalOrRemote(ClassChecker): # Test when in_server=True (should always call execute): (api, home) = create_test_api(in_server=True) - api.register(example) + api.add_plugin(example) api.finalize() cmd = api.Command.example assert cmd(version=u'2.47') == dict( @@ -1012,10 +1012,10 @@ class test_Object(ClassChecker): (api, home) = create_test_api() class ldap(backend.Backend): whatever = 'It worked!' - api.register(ldap) + api.add_plugin(ldap) class user(frontend.Object): backend_name = 'ldap' - api.register(user) + api.add_plugin(user) api.finalize() b = api.Object.user.backend assert isinstance(b, ldap) @@ -1118,8 +1118,8 @@ class test_Method(ClassChecker): class user_verb(self.cls): takes_args = args takes_options = options - api.register(user) - api.register(user_verb) + api.add_plugin(user) + api.add_plugin(user_verb) api.finalize() return api |