def setUp(self): def raise_(e): raise e self.long_time_method = MagicMock() self.dispatcher = { "add": sum, "list_len": len, "101_base": lambda **kwargs: int("101", **kwargs), "error": lambda: raise_(Exception("error_explanation")), "long_time_method": self.long_time_method, "echo": lambda x: x, } self.manager = JSONRPCResponseManager()
def setUpClass(cls): cls.manager = JSONRPCResponseManager()