#NEWLINE# def test_to_json_and_back( self ) : #NEWLINE# #INDENT# artist1 = Artist ( uri = 'uri' , name = 'name' ) #NEWLINE# serialized = json . dumps ( artist1 , cls = ModelJSONEncoder ) #NEWLINE# artist2 = json . loads ( serialized , object_hook = model_json_decoder ) #NEWLINE# self . assertEqual ( self , artist2 )