#NEWLINE# def test_to_json_and_back_with_unknown_field( self ) : #NEWLINE# #INDENT# artist = Artist ( uri = 'uri' , name = 'name' ) . serialize ( ) #NEWLINE# artist [ 'foo' ] = 'foo' #NEWLINE# serialized = json . dumps ( artist ) #NEWLINE# with self . assertRaises ( TypeError ) : #NEWLINE# #INDENT# json . loads ( serialized , object_hook = model_json_decoder )