File: test_dump.py

package info (click to toggle)
nodebox-web 1.9.4.6-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,900 kB
  • sloc: python: 7,582; ansic: 581; xml: 239; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 310 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
from unittest import TestCase
from cStringIO import StringIO

import simplejson as S

class TestDump(TestCase):
    def test_dump(self):
        sio = StringIO()
        S.dump({}, sio)
        self.assertEquals(sio.getvalue(), '{}')
    
    def test_dumps(self):
        self.assertEquals(S.dumps({}), '{}')