MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / test_categories

Method test_categories

test/functional/rpc_help.py:21–44  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

19 self.dump_help()
20
21 def test_categories(self):
22 node = self.nodes[0]
23
24 # wrong argument count
25 assert_raises_rpc_error(-1, 'help', node.help, 'foo', 'bar')
26
27 # invalid argument
28 assert_raises_rpc_error(-1, 'JSON value is not a string as expected', node.help, 0)
29
30 # help of unknown command
31 assert_equal(node.help('foo'), 'help: unknown command: foo')
32
33 # command titles
34 titles = [line[3:-3] for line in node.help().splitlines() if line.startswith('==')]
35
36 components = ['Blockchain', 'Control', 'Generating', 'Mining', 'Network', 'Rawtransactions', 'Util']
37
38 if self.is_wallet_compiled():
39 components.append('Wallet')
40
41 if self.is_zmq_compiled():
42 components.append('Zmq')
43
44 assert_equal(titles, components)
45
46 def dump_help(self):
47 dump_dir = os.path.join(self.options.tmpdir, 'rpc_help_dump')

Callers 1

run_testMethod · 0.95

Calls 5

assert_raises_rpc_errorFunction · 0.90
assert_equalFunction · 0.90
helpMethod · 0.80
is_wallet_compiledMethod · 0.80
is_zmq_compiledMethod · 0.80

Tested by

no test coverage detected