示例#1
0
 def test_error_handling_appbase(self):
     rpc = HiveNodeRPC(urls=self.nodes_hiveit,
                       num_retries=2,
                       num_retries_call=3)
     with self.assertRaises(exceptions.NoMethodWithName):
         rpc.get_wrong_command()
     with self.assertRaises(exceptions.NoApiWithName):
         rpc.get_block({"block_num": 1}, api="wrong_api")
示例#2
0
 def test_error_handling(self):
     rpc = HiveNodeRPC(urls=self.nodes_hiveit,
                       num_retries=2,
                       num_retries_call=3)
     with self.assertRaises(exceptions.NoMethodWithName):
         rpc.get_wrong_command()
     with self.assertRaises(exceptions.UnhandledRPCError):
         rpc.get_accounts("test")