예제 #1
0
 def test_all(self):
     truth = remove_endline(open("json/testall.json").read())
     doc = {
         "a": [
             10,
             {},
             {
                 "hello": 1,
                 "zzz": []
             },
             "bob",
             "agnes"
         ],
         "1": 55.7,
         "3": {
             "xxxxx": {},
             "ggg": []
         },
         "b": None,
         "c": True,
         "d": False
     }
     s = jsoncanon.dumps(doc)
     self.assertEqual(s, truth)
예제 #2
0
 def test_jsoncanon_sorting_lists(self):
     for i in xrange(self.size):
         jsoncanon.dumps(self.doc, sort_lists=True)
예제 #3
0
 def test_jsoncanon(self):
     for i in xrange(self.size):
         jsoncanon.dumps(self.doc)