MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_cli_multiline_help

Function test_cli_multiline_help

tests/test_misc.py:1205–1224  ·  view source on GitHub ↗
(node_factory)

Source from the content-addressed store, hash-verified

1203
1204
1205def test_cli_multiline_help(node_factory):
1206 l1 = node_factory.get_node(options={'plugin': os.path.join(os.getcwd(), 'tests/plugins/multiline-help.py')})
1207
1208 out = subprocess.check_output(['cli/lightning-cli',
1209 '--network={}'.format(TEST_NETWORK),
1210 '--lightning-dir={}'
1211 .format(l1.daemon.lightning_dir),
1212 'help']).decode('utf-8')
1213 assert ("helpme msat \n"
1214 " This is a message which consumes multiple lines and thus should\n"
1215 " be well-formatted by lightning-cli help\n" in out)
1216
1217 out = subprocess.check_output(['cli/lightning-cli',
1218 '--network={}'.format(TEST_NETWORK),
1219 '--lightning-dir={}'
1220 .format(l1.daemon.lightning_dir),
1221 'help', 'helpme']).decode('utf-8')
1222 assert out == ("helpme msat \n"
1223 " This is a message which consumes multiple lines and thus should\n"
1224 " be well-formatted by lightning-cli help\n")
1225
1226
1227def test_cli_commando(node_factory):

Callers

nothing calls this directly

Calls 3

joinMethod · 0.80
get_nodeMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected