#NEWLINE# def test_to_json_and_back( self ) : #NEWLINE# #INDENT# ref1 = Ref ( uri = 'uri' ) #NEWLINE# serialized = json . dumps ( ref1 , cls = ModelJSONEncoder ) #NEWLINE# ref2 = json . loads ( serialized , object_hook = model_json_decoder ) #NEWLINE# self . assertEqual ( ref1 , ref1 )