summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2009-02-06 10:09:30 -0700
committerRob Crittenden <rcritten@redhat.com>2009-02-17 16:03:08 -0500
commit18cecdc515f04853a316fa74b1247878ae77ba15 (patch)
tree449ffd70a3cef09b4dd14972f96e0cbccf5ce39b
parent336c4c2cafb6cff77d43404328f0c833f75bb2b2 (diff)
downloadfreeipa-18cecdc515f04853a316fa74b1247878ae77ba15.tar.gz
freeipa-18cecdc515f04853a316fa74b1247878ae77ba15.tar.xz
freeipa-18cecdc515f04853a316fa74b1247878ae77ba15.zip
Removed depreciated xmlrpc_marshal() and xmlrpc_unmarshal() functions
-rw-r--r--ipalib/util.py27
-rw-r--r--tests/test_ipalib/test_util.py24
2 files changed, 0 insertions, 51 deletions
diff --git a/ipalib/util.py b/ipalib/util.py
index 9c995825e..13f75082e 100644
--- a/ipalib/util.py
+++ b/ipalib/util.py
@@ -32,33 +32,6 @@ from xmlrpclib import Binary
import krbV
-
-def xmlrpc_marshal(*args, **kw):
- """
- Marshal (args, kw) into ((kw,) + args).
- """
- kw = dict(
- filter(lambda item: item[1] is not None, kw.iteritems())
- )
- args = tuple(
- filter(lambda value: value is not None, args)
- )
- return ((kw,) + args)
-
-
-def xmlrpc_unmarshal(*params):
- """
- Unmarshal (params) into (args, kw).
- """
- if len(params) > 0:
- kw = params[0]
- if type(kw) is not dict:
- raise TypeError('first xmlrpc argument must be dict')
- else:
- kw = {}
- return (params[1:], kw)
-
-
def get_current_principal():
try:
return krbV.default_context().default_ccache().principal().name
diff --git a/tests/test_ipalib/test_util.py b/tests/test_ipalib/test_util.py
index 6729fcda5..166a68241 100644
--- a/tests/test_ipalib/test_util.py
+++ b/tests/test_ipalib/test_util.py
@@ -25,30 +25,6 @@ from tests.util import raises
from ipalib import util
-def test_xmlrpc_marshal():
- """
- Test the `ipalib.util.xmlrpc_marshal` function.
- """
- f = util.xmlrpc_marshal
- assert f() == ({},)
- assert f('one', 'two') == ({}, 'one', 'two')
- assert f(one=1, two=2) == (dict(one=1, two=2),)
- assert f('one', 'two', three=3, four=4) == \
- (dict(three=3, four=4), 'one', 'two')
-
-
-def test_xmlrpc_unmarshal():
- """
- Test the `ipalib.util.xmlrpc_unmarshal` function.
- """
- f = util.xmlrpc_unmarshal
- assert f() == (tuple(), {})
- assert f({}, 'one', 'two') == (('one', 'two'), {})
- assert f(dict(one=1, two=2)) == (tuple(), dict(one=1, two=2))
- assert f(dict(three=3, four=4), 'one', 'two') == \
- (('one', 'two'), dict(three=3, four=4))
-
-
def test_make_repr():
"""
Test the `ipalib.util.make_repr` function.