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.
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
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()