summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_ipa_server/test_rpc.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_ipa_server/test_rpc.py b/tests/test_ipa_server/test_rpc.py
index 56ad3f064..6c46b130a 100644
--- a/tests/test_ipa_server/test_rpc.py
+++ b/tests/test_ipa_server/test_rpc.py
@@ -26,6 +26,20 @@ from ipalib import errors, Command
from ipa_server import rpc
+def test_params_2_args_options():
+ """
+ Test the `ipa_server.rpc.params_2_args_options` function.
+ """
+ f = rpc.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())
+
+
class test_xmlrpc(PluginTester):
"""
Test the `ipa_server.rpc.xmlrpc` plugin.