From 419abdaff2f7d9e773c11754fe8966d689bbb833 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Mon, 1 Oct 2001 17:47:44 +0000 Subject: [PATCH] simple dumps/loads test case for xmlrpclib --- Lib/test/test_xmlrpc.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Lib/test/test_xmlrpc.py diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py new file mode 100644 index 00000000000..7fcfd8dedf6 --- /dev/null +++ b/Lib/test/test_xmlrpc.py @@ -0,0 +1,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()