

@defer.inlineCallbacks
def test_bad_handler(self):
    request = {
        'jsonrpc': '2.0',
        'method': 'bad_handler',
        'params': [10],
        'id': '1',
    }
    expected = {
        'jsonrpc': '2.0',
        'error': {
            'code': (- 32000),
            'message': 'Server error',
        },
        'id': '1',
    }
    (yield self.makeRequest(request, expected))
    e = self.flushLoggedErrors(TypeError)
    self.assertTrue(e[0].check(TypeError))

dataset/ETHPy150Open flowroute/txjason/txjason/tests/test_service.py ServiceTestCase.test_bad_handler/original