blob: 9151c4321c5598997fc0dea7903eaf42367cd1a1 [file] [log] [blame]
Christian Heimes90540002008-05-08 14:29:10 +00001from unittest import TestCase
2
3import json
4
5# from http://json.org/JSON_checker/test/pass3.json
6JSON = r'''
7{
8 "JSON Test Pattern pass3": {
9 "The outermost value": "must be an object or array.",
10 "In this test": "It is an object."
11 }
12}
13'''
14
15class TestPass3(TestCase):
16 def test_parse(self):
17 # test in/out equivalence and parsing
18 res = json.loads(JSON)
19 out = json.dumps(res)
Ezio Melottib3aedd42010-11-20 19:04:17 +000020 self.assertEqual(res, json.loads(out))