mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
XML-RPC signature change
This commit is contained in:
parent
09d3a6b910
commit
918721c1d0
@ -401,7 +401,7 @@ class xmlclient(Connectible):
|
||||
)
|
||||
self.info('Forwarding %r to server %r', name, self.env.xmlrpc_uri)
|
||||
command = getattr(self.conn, name)
|
||||
params = args + (kw,)
|
||||
params = [args, kw]
|
||||
try:
|
||||
response = command(*xml_wrap(params))
|
||||
return xml_unwrap(response)
|
||||
|
@ -72,12 +72,11 @@ def read_input(environ):
|
||||
|
||||
|
||||
def params_2_args_options(params):
|
||||
assert type(params) is tuple
|
||||
if len(params) == 0:
|
||||
return (tuple(), dict())
|
||||
if type(params[-1]) is dict:
|
||||
return (params[:-1], params[-1])
|
||||
return (params, dict())
|
||||
if len(params) == 1:
|
||||
return (params[0], dict())
|
||||
return (params[0], params[1])
|
||||
|
||||
|
||||
def nicify_query(query, encoding='utf-8'):
|
||||
|
@ -204,7 +204,7 @@ class test_xmlclient(PluginTester):
|
||||
(o, api, home) = self.instance('Backend', user_add, in_server=False)
|
||||
args = (binary_bytes, utf8_bytes, unicode_str)
|
||||
kw = dict(one=binary_bytes, two=utf8_bytes, three=unicode_str)
|
||||
params = args + (kw,)
|
||||
params = [args, kw]
|
||||
result = (unicode_str, binary_bytes, utf8_bytes)
|
||||
conn = DummyClass(
|
||||
(
|
||||
|
@ -79,10 +79,8 @@ def test_params_2_args_options():
|
||||
args = ('Hello', u'world!')
|
||||
options = dict(one=1, two=u'Two', three='Three')
|
||||
assert f(tuple()) == (tuple(), dict())
|
||||
assert f(args) == (args, dict())
|
||||
assert f((options,)) == (tuple(), options)
|
||||
assert f(args + (options,)) == (args, options)
|
||||
assert f((options,) + args) == ((options,) + args, dict())
|
||||
assert f([args]) == (args, dict())
|
||||
assert f([args, options]) == (args, options)
|
||||
|
||||
|
||||
class test_session(object):
|
||||
|
Loading…
Reference in New Issue
Block a user