#NEWLINE# def test_serialize_works_as_expected( self ) : #NEWLINE# #INDENT# item = DataPoint ( ) #NEWLINE# item . name = 'Test string' #NEWLINE# item . kind = object ( ) #NEWLINE# item . value = 1.5 #NEWLINE# item . count = 42 #NEWLINE# item . min = 1.5 #NEWLINE# item . max = 1.5 #NEWLINE# item . std_dev = 1.5 #NEWLINE# actual = json . dumps ( item . write ( ) , separators = ( ',' , ':' ) , cls = TestJsonEncoder ) #NEWLINE# expected = '{"name":"Test string","kind":{},"value":1.5,"count":42,"min":1.5,"max":1.5,"stdDev":1.5}' #NEWLINE# self . assertEqual ( self , actual )