summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2001-10-01 17:47:44 (GMT)
committerSkip Montanaro <skip@pobox.com>2001-10-01 17:47:44 (GMT)
commit419abdaff2f7d9e773c11754fe8966d689bbb833 (patch)
tree3bbf9895fe6c6ab1d3049195f87008bc1b2c06d9
parent55f2099b2f31cfab6c881989f60552c3621ce752 (diff)
downloadcpython-419abdaff2f7d9e773c11754fe8966d689bbb833.zip
cpython-419abdaff2f7d9e773c11754fe8966d689bbb833.tar.gz
cpython-419abdaff2f7d9e773c11754fe8966d689bbb833.tar.bz2
simple dumps/loads test case for xmlrpclib
-rw-r--r--Lib/test/test_xmlrpc.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py
new file mode 100644
index 0000000..7fcfd8d
--- /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()