summaryrefslogtreecommitdiff
path: root/ovsdb/simplejson/tests/test_pass3.py
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2009-11-23 16:07:36 -0800
committerBen Pfaff <blp@nicira.com>2009-11-23 16:07:36 -0800
commitd879a707a38eff0335e1b5c12ae4c61f4aa0296b (patch)
tree10d37b87a53ba1376e467a60bbe57cc355d7b7c9 /ovsdb/simplejson/tests/test_pass3.py
parent6bf4c631ae776f4e936b5f01efe4bfbe190f5d99 (diff)
downloadopenvswitch-d879a707a38eff0335e1b5c12ae4c61f4aa0296b.tar.gz
ovsdb: Add ovsdb IDL compiler to build system.
This first stab at any interface definition language and compiler for OVSDB will give other developers a chance to look at it and try to integrate it. The IDL is not actually implemented yet; I am working on that.
Diffstat (limited to 'ovsdb/simplejson/tests/test_pass3.py')
-rw-r--r--ovsdb/simplejson/tests/test_pass3.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/ovsdb/simplejson/tests/test_pass3.py b/ovsdb/simplejson/tests/test_pass3.py
new file mode 100644
index 000000000..f591aba98
--- /dev/null
+++ b/ovsdb/simplejson/tests/test_pass3.py
@@ -0,0 +1,20 @@
+from unittest import TestCase
+
+import simplejson as json
+
+# from http://json.org/JSON_checker/test/pass3.json
+JSON = r'''
+{
+ "JSON Test Pattern pass3": {
+ "The outermost value": "must be an object or array.",
+ "In this test": "It is an object."
+ }
+}
+'''
+
+class TestPass3(TestCase):
+ def test_parse(self):
+ # test in/out equivalence and parsing
+ res = json.loads(JSON)
+ out = json.dumps(res)
+ self.assertEquals(res, json.loads(out))