#NEWLINE# def test_invalid_params_causes_invalid_params_error( self ) : #NEWLINE# #INDENT# request = { #NEWLINE# #INDENT# 'jsonrpc' : '2.0' , #NEWLINE# 'method' : 'core.get_uri_schemes' , #NEWLINE# 'params' : [ 'bogus' ] , #NEWLINE# 'id' : 1 , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . jrw . handle_data ( request ) #NEWLINE# error = response [ 'error' ] #NEWLINE# self . assertEqual ( error [ 'code' ] , ( - 32602 ) ) #NEWLINE# self . assertEqual ( error [ 'message' ] , 'Invalid params' ) #NEWLINE# data = error [ 'data' ] #NEWLINE# self . assertEqual ( data [ 'type' ] , 'TypeError' ) #NEWLINE# self . assertEqual ( data [ 'message' ] , 'get_uri_schemes() takes exactly 1 argument (2 given)' ) #NEWLINE# self . assertIn ( 'traceback' , data ) #NEWLINE# self . assertIn ( 'Traceback (most recent call last):' , data [ 'traceback' ] )