diff options
author | Martin Zumsande <mzumsande@gmail.com> | 2023-11-06 16:03:47 -0500 |
---|---|---|
committer | Martin Zumsande <mzumsande@gmail.com> | 2023-11-08 17:34:50 -0500 |
commit | 3598a1b5c932634dc7ccb991cc83df5e1a1dcaa9 (patch) | |
tree | 70693dd6d84ea9843dd7c6d64406f2d6ee1414ec /test | |
parent | 68a90017519874793e34e3b439a63e5aa3a6f6a7 (diff) | |
download | bitcoin-3598a1b5c932634dc7ccb991cc83df5e1a1dcaa9.tar.xz |
test: enable --v2transport in combination with --usecli
By renaming the "command" send_cli arg. The old name was unsuitable
because the "addnode" RPC has its own "command" arg, leading to
ambiguity when included in kwargs.
Can be tested with
"python3 wallet_multiwallet.py --usecli --v2transport"
which fails on master because of this (python throws a TypeError).
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/test_framework/test_node.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py index 435140cbeb..c23119c6cb 100755 --- a/test/functional/test_framework/test_node.py +++ b/test/functional/test_framework/test_node.py @@ -787,15 +787,15 @@ class TestNodeCLI(): results.append(dict(error=e)) return results - def send_cli(self, command=None, *args, **kwargs): + def send_cli(self, clicommand=None, *args, **kwargs): """Run bitcoin-cli command. Deserializes returned string as python object.""" pos_args = [arg_to_cli(arg) for arg in args] named_args = [str(key) + "=" + arg_to_cli(value) for (key, value) in kwargs.items()] p_args = [self.binary, f"-datadir={self.datadir}"] + self.options if named_args: p_args += ["-named"] - if command is not None: - p_args += [command] + if clicommand is not None: + p_args += [clicommand] p_args += pos_args + named_args self.log.debug("Running bitcoin-cli {}".format(p_args[2:])) process = subprocess.Popen(p_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) |