#NEWLINE# def test_idStrV2( self ) : #NEWLINE# #INDENT# request = DummyRequest ( [ '' ] ) #NEWLINE# request . content = StringIO ( ( '{"method": "echo", "id": "abcd", ' + '"params": ["ab"], "jsonrpc": "2.0"}' ) ) #NEWLINE# d = _render ( self . srv , request ) #NEWLINE# def rendered( _ ) : #NEWLINE# #INDENT# expected = ( '{"jsonrpc": "2.0", "id": "abcd", ' + '"result": "ab"}' ) #NEWLINE# self . assertEquals ( request . written [ 0 ] , expected ) #NEWLINE# #UNINDENT# d . addCallback ( rendered ) #NEWLINE# return d