1 from unittest import TestCase
3 import simplejson as json
6 class TestIndent(TestCase):
8 h = [['blorpie'], ['whoops'], [], 'd-shtaeou', 'd-nthiouh', 'i-vhbjkhnth',
9 {'nifty': 87}, {'field': 'yes', 'morefield': False} ]
11 expect = textwrap.dedent("""\
34 d2 = json.dumps(h, indent=2, sort_keys=True, separators=(',', ': '))
39 self.assertEquals(h1, h)
40 self.assertEquals(h2, h)
41 self.assertEquals(d2, expect)