#NEWLINE# def test_invalidMethodCaseSensitive( self ) : #NEWLINE# #INDENT# request = DummyRequest ( [ '' ] ) #NEWLINE# request . content = StringIO ( ( '{"METHOD": "echo", "id": "ABCD", ' + '"params": ["AB"]}' ) ) #NEWLINE# d = _render ( self . srv , request ) #NEWLINE# def rendered( _ ) : #NEWLINE# #INDENT# expected = ( '{"result": null, "id": "ABCD", "error": ' + '{"message": "Invalid method type", "code": -32600}}' ) #NEWLINE# self . assertEquals ( request . written [ 0 ] , expected ) #NEWLINE# #UNINDENT# d . addCallback ( rendered ) #NEWLINE# return d