summaryrefslogtreecommitdiffstats
path: root/tests/test_ipaserver
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2009-01-23 16:16:00 -0700
committerRob Crittenden <rcritten@redhat.com>2009-02-03 15:29:03 -0500
commit0a3ae60038c7b672d83f24678e2d791b3cad443e (patch)
tree8e232b8e4759c3ac0c106e37b51fb576354bcbe4 /tests/test_ipaserver
parent0cfb0e191ad878d1b22e98ce484bf3048f7138c2 (diff)
downloadfreeipa-0a3ae60038c7b672d83f24678e2d791b3cad443e.tar.gz
freeipa-0a3ae60038c7b672d83f24678e2d791b3cad443e.tar.xz
freeipa-0a3ae60038c7b672d83f24678e2d791b3cad443e.zip
Ported xmlserver to subclass from Executioner
Diffstat (limited to 'tests/test_ipaserver')
-rw-r--r--tests/test_ipaserver/test_rpcserver.py29
1 files changed, 1 insertions, 28 deletions
diff --git a/tests/test_ipaserver/test_rpcserver.py b/tests/test_ipaserver/test_rpcserver.py
index 48c1d36ef..bb0cba684 100644
--- a/tests/test_ipaserver/test_rpcserver.py
+++ b/tests/test_ipaserver/test_rpcserver.py
@@ -48,32 +48,5 @@ class test_xmlserver(PluginTester):
_plugin = rpcserver.xmlserver
- def test_dispatch(self):
- """
- Test the `ipaserver.rpcserver.xmlserver.dispatch` method.
- """
- (o, api, home) = self.instance('Backend', in_server=True)
- e = raises(errors2.CommandError, o.dispatch, 'echo', tuple())
- assert e.name == 'echo'
-
- class echo(Command):
- takes_args = ['arg1', 'arg2+']
- takes_options = ['option1?', 'option2?']
- def execute(self, *args, **options):
- assert type(args[1]) is tuple
- return args + (options,)
-
- (o, api, home) = self.instance('Backend', echo, in_server=True)
- def call(params):
- response = o.dispatch('echo', params)
- assert type(response) is tuple and len(response) == 1
- return response[0]
- arg1 = unicode_str
- arg2 = (u'Hello', unicode_str, u'world!')
- options = dict(option1=u'How are you?', option2=unicode_str)
- assert call((arg1, arg2, options)) == (arg1, arg2, options)
- assert call((arg1,) + arg2 + (options,)) == (arg1, arg2, options)
-
-
- def test_execute(self):
+ def test_marshaled_dispatch(self):
(o, api, home) = self.instance('Backend', in_server=True)