Kaydet (Commit) 419abdaf authored tarafından Skip Montanaro's avatar Skip Montanaro

simple dumps/loads test case for xmlrpclib

üst 55f2099b
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()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment