Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_help.py
Show All 22 Lines | def run_test(self): | ||||
'JSON value is not a string as expected', node.help, 0) | 'JSON value is not a string as expected', node.help, 0) | ||||
# help of unknown command | # help of unknown command | ||||
assert_equal(node.help('foo'), 'help: unknown command: foo') | assert_equal(node.help('foo'), 'help: unknown command: foo') | ||||
# command titles | # command titles | ||||
titles = [line[3:-3] | titles = [line[3:-3] | ||||
for line in node.help().splitlines() if line.startswith('==')] | for line in node.help().splitlines() if line.startswith('==')] | ||||
components = ['Blockchain', 'Control', 'Generating', | components = ['Avalanche', 'Blockchain', 'Control', 'Generating', | ||||
'Mining', 'Network', 'Rawtransactions', 'Util'] | 'Mining', 'Network', 'Rawtransactions', 'Util'] | ||||
if self.is_wallet_compiled(): | if self.is_wallet_compiled(): | ||||
components.append('Wallet') | components.append('Wallet') | ||||
if self.is_zmq_compiled(): | if self.is_zmq_compiled(): | ||||
components.append('Zmq') | components.append('Zmq') | ||||
assert_equal(titles, components) | assert_equal(titles, components) | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
HelpRpcTest().main() | HelpRpcTest().main() |