#NEWLINE# def test_wrongParams( self ) : #NEWLINE# #INDENT# request = DummyRequest ( [ '' ] ) #NEWLINE# request . content = StringIO ( ( '{"method": "sql", "id": 1, ' + '"params": ["aa", "bb"]}' ) ) #NEWLINE# d = _render ( self . srv , request ) #NEWLINE# def rendered( _ ) : #NEWLINE# #INDENT# expected = ( ( '{"result": null, "id": 1, "error": {"message": ' + '"jsonrpc_sql() takes exactly 1 argument (3 given)"' ) + ', "code": -32602}}' ) #NEWLINE# self . assertEquals ( request . written [ 0 ] , expected ) #NEWLINE# #UNINDENT# d . addCallback ( rendered ) #NEWLINE# return d