Sha256: 08eb6187931747d5f42a578d1943b040a84df43b5f71f50f4a68d308201970b5

Contents?: true

Size: 1014 Bytes

Versions: 30

Compression:

Stored size: 1014 Bytes

Contents

import sys
import test_support
import unittest
import xmlrpclib

alist = [{'astring': 'foo@bar.baz.spam',
          'afloat': 7283.43,
          'anint': 2**20,
          'ashortlong': 2L,
          '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_dump_big_long(self):
        self.assertRaises(OverflowError, xmlrpclib.dumps, (2L**99,))

    def test_dump_bad_dict(self):
        self.assertRaises(TypeError, xmlrpclib.dumps, ({(1,2,3): 1},))

    def test_dump_big_int(self):
        if sys.maxint > 2L**31-1:
            self.assertRaises(OverflowError, xmlrpclib.dumps,
                              (int(2L**34),))

def test_main():
    test_support.run_unittest(XMLRPCTestCase)


if __name__ == "__main__":
    test_main()

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
rubyfox-server-2.19.2.0 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.17.3.2 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.17.3.1 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.17.3.0 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.16.3.2 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.16.3.1 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.16.0.4 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.16.0.3 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.16.0.2 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.16.0.1 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.16.0.0 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.13.7.3 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.13.6.2 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.13.6.1 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.13.5.1 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.13.4.1 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.13.3.1 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.12.5.1 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.12.5.0 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py
rubyfox-server-2.12.4.0 lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py