Exemplo n.º 1
0
 def test_pretty_multiline(self):
     """It should return a multiline JSON string for a dict with members."""
     d = {'a': 1}
     s = util.pretty(d)
     self.assertEqual(s, '{\n  "a": 1\n}')
Exemplo n.º 2
0
 def test_pretty_basic(self):
     """It should return an empty JSON string for an empty dict."""
     d = {}
     s = util.pretty(d)
     self.assertEqual(s, '{}')