summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_xmlrpc.py
blob: 7fcfd8dedf6cbe7acffb544bbc607f893cb3f3d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import test_support
import unittest
import xmlrpclib

alist = [{'astring': 'foo@bar.baz.spam',
          'afloat': 7283.43,
          'anotherlist': ['.zyx.41'],
          'abase64': xmlrpclib.Binary("my dog has fleas"),
          'boolean': xmlrpclib.False,
          }]

class XMLRPCTestCase(unittest.TestCase):

    def test_dump_load(self):
        self.assertEquals(alist,
                          xmlrpclib.loads(xmlrpclib.dumps((alist,)))[0][0])

def test_main():
    test_support.run_unittest(XMLRPCTestCase)


if __name__ == "__main__":
    test_main()