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)
def test_jsoncanon_sorting_lists(self): for i in xrange(self.size): jsoncanon.dumps(self.doc, sort_lists=True)
def test_jsoncanon(self): for i in xrange(self.size): jsoncanon.dumps(self.doc)