[tests] Add bitcoin_cli.py test script
[bitcoinplatinum.git] / test / functional / bitcoin_cli.py
blob1033202092680ebda9abc873731866b3bd962ca8
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 __init__(self):
12 super().__init__()
13 self.setup_clean_chain = True
14 self.num_nodes = 1
16 def run_test(self):
17 """Main test logic"""
19 self.log.info("Compare responses from getinfo RPC and `bitcoin-cli getinfo`")
20 cli_get_info = self.nodes[0].cli.getinfo()
21 rpc_get_info = self.nodes[0].getinfo()
23 assert_equal(cli_get_info, rpc_get_info)
25 if __name__ == '__main__':
26 TestBitcoinCli().main()