gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.app / org.gvsig.scripting.app.mainplugin / src / main / resources-plugin / scripting / lib / simplejson / tests / test_pass3.py @ 545
History | View | Annotate | Download (482 Bytes)
1 |
from unittest import TestCase |
---|---|
2 |
|
3 |
import simplejson as json |
4 |
|
5 |
# from http://json.org/JSON_checker/test/pass3.json
|
6 |
JSON = 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 |
|
15 |
class TestPass3(TestCase): |
16 |
def test_parse(self): |
17 |
# test in/out equivalence and parsing
|
18 |
res = json.loads(JSON) |
19 |
out = json.dumps(res) |
20 |
self.assertEqual(res, json.loads(out))
|