#NEWLINE# def test_invalid_json( self ) : #NEWLINE# #INDENT# invalid_json = ( '{"jsonrpc": "2.0", "method": "foobar, ' + '"params": "bar", "baz]' ) #NEWLINE# response = self . client . _run_request ( invalid_json ) #NEWLINE# response = json . loads ( history . response ) #NEWLINE# verify_response = json . loads ( ( '{"jsonrpc": "2.0", "error": {"code": -32700,' + ' "message": "Parse error."}, "id": null}' ) ) #NEWLINE# verify_response [ 'error' ] [ 'message' ] = response [ 'error' ] [ 'message' ] #NEWLINE# self . assertTrue ( ( response == verify_response ) )