freeipa/tests/test_xmlrpc
Petr Viktorin 9960149e3f Rework the CallbackInterface
Fix several problems with the callback interface:
- Automatically registered callbacks (i.e. methods named
    exc_callback, pre_callback etc) were registered on every
    instantiation.
    Fix: Do not register callbacks in __init__; instead return the
    method when asked for it.
- The calling code had to distinguish between bound methods and
    plain functions by checking the 'im_self' attribute.
    Fix: Always return the "default" callback as an unbound method.
    Registered callbacks now always take the extra `self` argument,
    whether they happen to be bound methods or not.
    Calling code now always needs to pass the `self` argument.
- Did not work well with inheritance: due to the fact that Python
    looks up missing attributes in superclasses, callbacks could
    get attached to a superclass if it was instantiated early enough. *
    Fix: Instead of attribute lookup, use a dictionary with class keys.
- The interface included the callback types, which are LDAP-specific.
    Fix: Create generic register_callback and get_callback mehods,
    move LDAP-specific code to BaseLDAPCommand

Update code that calls the callbacks.
Add tests.
Remove lint exceptions for CallbackInterface.

* https://fedorahosted.org/freeipa/ticket/2674
2012-06-14 11:09:43 +02:00
..
__init__.py Change FreeIPA license to GPLv3+ 2010-12-20 17:19:53 -05:00
objectclasses.py Add support for SSH public keys to user and host objects. 2012-02-13 22:21:27 -05:00
test_attr.py Disallow setattr on no_update/no_create params 2012-05-29 09:23:26 +02:00
test_automember_plugin.py Fix expected error messages in tests 2012-04-10 21:05:45 -04:00
test_automount_plugin.py Add more automount tests 2012-05-31 20:16:29 -04:00
test_baseldap_plugin.py Rework the CallbackInterface 2012-06-14 11:09:43 +02:00
test_batch_plugin.py Test the batch plugin 2012-04-03 16:19:59 -04:00
test_cert.py Fix uses of O=REALM instead of the configured certificate subject base. 2012-03-26 20:29:26 -04:00
test_config_plugin.py Check for empty/single value parameters before calling callbacks 2012-05-15 10:02:26 +02:00
test_delegation_plugin.py Fix expected error messages in tests 2012-04-10 21:05:45 -04:00
test_dns_plugin.py Fill new DNS zone update policy by default 2012-06-05 08:41:46 +02:00
test_group_plugin.py Prevent deletion of the last admin 2012-06-06 21:57:12 -04:00
test_hbac_plugin.py Validate externalhost (when added by --addattr/--setattr) 2012-05-11 08:14:20 +02:00
test_hbacsvcgroup_plugin.py Fix expected error messages in tests 2012-04-10 21:05:45 -04:00
test_hbactest_plugin.py Use valid argument names in tests 2012-03-25 18:05:33 -04:00
test_host_plugin.py Update hostname validator error messages in tests 2012-05-03 16:54:57 +02:00
test_hostgroup_plugin.py Allow one letter net/hostgroups names 2012-05-07 08:35:11 +02:00
test_krbtpolicy.py Reset krbtpolicy when a unit test is finished 2012-05-28 17:24:08 +02:00
test_nesting.py Suppress managed netgroups as indirect members of hosts. 2011-09-19 08:41:25 +02:00
test_netgroup_plugin.py Validate externalhost (when added by --addattr/--setattr) 2012-05-11 08:14:20 +02:00
test_passwd_plugin.py Use nose tools to check for exceptions 2012-03-19 16:33:35 +01:00
test_permission_plugin.py permission-find missed some results with --pkey-only option 2012-06-01 07:51:59 +02:00
test_privilege_plugin.py Do not crash on empty reverse member options 2012-05-07 17:21:58 +02:00
test_pwpolicy_plugin.py Fix the pwpolicy_find post_callback 2012-05-28 16:03:28 +02:00
test_replace.py Change the way has_keytab is determined, also check for password. 2011-08-24 14:12:01 +02:00
test_role_plugin.py Do not crash on empty reverse member options 2012-05-07 17:21:58 +02:00
test_selfservice_plugin.py Do not use extra command options in ACI, permission, selfservice 2012-05-14 10:38:07 +02:00
test_selinuxusermap_plugin.py Fix expected error messages in tests 2012-04-10 21:05:45 -04:00
test_service_plugin.py Fix expected error messages in tests 2012-04-10 21:05:45 -04:00
test_sudocmd_plugin.py Fix expected error messages in tests 2012-04-10 21:05:45 -04:00
test_sudocmdgroup_plugin.py Fix expected error messages in tests 2012-04-10 21:05:45 -04:00
test_sudorule_plugin.py Validate externalhost (when added by --addattr/--setattr) 2012-05-11 08:14:20 +02:00
test_user_plugin.py Prevent deletion of the last admin 2012-06-06 21:57:12 -04:00
xmlrpc_test.py Fix expected error messages in tests 2012-04-10 21:05:45 -04:00