Пример #1
0
 def test_to_json(self):
     # XXX Needs a better test.  For now, just exercise the
     # to_json method.
     a = []
     b = []
     a.append(b)
     graph = ObjectGraph([a, b])
     json_graph = graph.to_json()
     self.assertIsInstance(json_graph, six.text_type)
     # Make sure that the result is valid json.
     json.loads(json_graph)