#NEWLINE# def test_noSuchMethodV1( self ) : #NEWLINE# #INDENT# request = DummyRequest ( [ '' ] ) #NEWLINE# request . content = StringIO ( '{"method": "aaaa", "id": 1}' ) #NEWLINE# d = _render ( self . srv , request ) #NEWLINE# def rendered( _ ) : #NEWLINE# #INDENT# expected = ( ( '{"result": null, "id": 1, "error": ' + '{"message": "Method aaaa not found", ' ) + '"code": -32601}}' ) #NEWLINE# self . assertEquals ( request . written [ 0 ] , expected ) #NEWLINE# #UNINDENT# d . addCallback ( rendered ) #NEWLINE# return d