(finally) remove getinfo in favor of more module-specific infos
[bitcoinplatinum.git] / test / functional / bitcoin_cli.py
blob04847252eb3b2a4c0666dad01a8878f9e12b128d
1 #!/usr/bin/env python3
2 # Copyright (c) 2017 The Bitcoin Core developers
3 # Distributed under the MIT software license, see the accompanying
4 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 """Test bitcoin-cli"""
6 from test_framework.test_framework import BitcoinTestFramework
7 from test_framework.util import assert_equal
9 class TestBitcoinCli(BitcoinTestFramework):
11 def set_test_params(self):
12 self.setup_clean_chain = True
13 self.num_nodes = 1
15 def run_test(self):
16 """Main test logic"""
18 self.log.info("Compare responses from gewalletinfo RPC and `bitcoin-cli getwalletinfo`")
19 cli_get_info = self.nodes[0].cli.getwalletinfo()
20 rpc_get_info = self.nodes[0].getwalletinfo()
22 assert_equal(cli_get_info, rpc_get_info)
24 self.log.info("Compare responses from getblockchaininfo RPC and `bitcoin-cli getblockchaininfo`")
25 cli_get_info = self.nodes[0].cli.getblockchaininfo()
26 rpc_get_info = self.nodes[0].getblockchaininfo()
28 assert_equal(cli_get_info, rpc_get_info)
30 if __name__ == '__main__':
31 TestBitcoinCli().main()