diff options
Diffstat (limited to 'ipatests/test_ipalib')
-rw-r--r-- | ipatests/test_ipalib/test_backend.py | 8 | ||||
-rw-r--r-- | ipatests/test_ipalib/test_crud.py | 4 | ||||
-rw-r--r-- | ipatests/test_ipalib/test_frontend.py | 12 | ||||
-rw-r--r-- | ipatests/test_ipalib/test_plugable.py | 2 |
4 files changed, 13 insertions, 13 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() diff --git a/ipatests/test_ipalib/test_crud.py b/ipatests/test_ipalib/test_crud.py index 6d29ab97a..f17371659 100644 --- a/ipatests/test_ipalib/test_crud.py +++ b/ipatests/test_ipalib/test_crud.py @@ -47,8 +47,8 @@ class CrudChecker(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 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 diff --git a/ipatests/test_ipalib/test_plugable.py b/ipatests/test_ipalib/test_plugable.py index 2a6f8aa41..b0f607024 100644 --- a/ipatests/test_ipalib/test_plugable.py +++ b/ipatests/test_ipalib/test_plugable.py @@ -384,7 +384,7 @@ class test_API(ClassChecker): api = plugable.API([base0, base1], []) api.env.mode = 'unit_test' api.env.in_tree = True - r = api.register + r = api.add_plugin class base0_plugin0(base0): pass |