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