(self)
| 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') |
no test coverage detected