Back to index

python3.2  3.2.2
Public Member Functions | Static Public Attributes
test.json_tests.test_dump.TestCDump Class Reference
Inheritance diagram for test.json_tests.test_dump.TestCDump:
Inheritance graph
[legend]
Collaboration diagram for test.json_tests.test_dump.TestCDump:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_dump
def test_dumps
def test_encode_truefalse

Static Public Attributes

 json = cjson
tuple loads = staticmethod(cjson.loads)
tuple dumps = staticmethod(cjson.dumps)

Detailed Description

Definition at line 24 of file test_dump.py.


Member Function Documentation

Definition at line 6 of file test_dump.py.

00006 
00007     def test_dump(self):
00008         sio = StringIO()
00009         self.json.dump({}, sio)
00010         self.assertEqual(sio.getvalue(), '{}')

Here is the call graph for this function:

Definition at line 11 of file test_dump.py.

00011 
00012     def test_dumps(self):
00013         self.assertEqual(self.dumps({}), '{}')

Here is the call graph for this function:

Definition at line 14 of file test_dump.py.

00014 
00015     def test_encode_truefalse(self):
00016         self.assertEqual(self.dumps(
00017                  {True: False, False: True}, sort_keys=True),
00018                  '{"false": true, "true": false}')
00019         self.assertEqual(self.dumps(
00020                 {2: 3.0, 4.0: 5, False: 1, 6: True}, sort_keys=True),
00021                 '{"false": 1, "2": 3.0, "4.0": 5, "6": true}')
00022 

Here is the call graph for this function:


Member Data Documentation

tuple test.json_tests.CTest.dumps = staticmethod(cjson.dumps) [static, inherited]

Definition at line 24 of file __init__.py.

test.json_tests.CTest.json = cjson [static, inherited]

Definition at line 22 of file __init__.py.

tuple test.json_tests.CTest.loads = staticmethod(cjson.loads) [static, inherited]

Definition at line 23 of file __init__.py.


The documentation for this class was generated from the following file: