def testFullExecutor(self, ssl): bridge = _DummyBridge() with constructClient(self.log, bridge, ssl) as clientFactory: with self._client(clientFactory) as client: with self.assertRaises(JsonRpcErrorBase) as cm: self._callTimeout(client, "no_method", [], CALL_ID) self.assertEqual(cm.exception.code, JsonRpcInternalError().code)
def testMethodBadParameters(self, ssl): # Without a schema the server returns an internal error bridge = _DummyBridge() with constructClient(self.log, bridge, ssl) as clientFactory: with self._client(clientFactory) as client: with self.assertRaises(JsonRpcErrorBase) as cm: self._callTimeout(client, "echo", [], CALL_ID) self.assertEqual(cm.exception.code, JsonRpcInternalError().code)
def test_bad_parameters(self): with self._create_client() as client: with self.assertRaises(ServerError) as ex: client.Test.echo() self.assertEqual(ex.exception.code, JsonRpcInternalError().code)