summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-11-25 11:54:51 -0700
committerJason Gerard DeRose <jderose@redhat.com>2008-11-25 11:54:51 -0700
commit7350ccbffefdf81992b3ccd8aac814f3bb954be8 (patch)
treecdd07d157a310f2bb801d736f5d44e65eaa032e2 /tests
parent2d458a12339fbb7ef006ff7defc1e2f541e2f23f (diff)
downloadfreeipa-7350ccbffefdf81992b3ccd8aac814f3bb954be8.tar.gz
freeipa-7350ccbffefdf81992b3ccd8aac814f3bb954be8.tar.xz
freeipa-7350ccbffefdf81992b3ccd8aac814f3bb954be8.zip
Started fleshing out doodles in xmlrpc.execute()
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.