test: make rpc_psbt.py usable with --usecli

The psbt string would include a "=" sign, which would
make the cli interpret this as a named argument.
Fix this by making it an actual named arg with the
correct name.
This commit is contained in:
Martin Zumsande
2025-04-17 17:42:49 -04:00
parent 8f8ce9e174
commit af34e98086

View File

@ -72,7 +72,6 @@ class PSBTTest(BitcoinTestFramework):
# whitelist peers to speed up tx relay / mempool sync
for args in self.extra_args:
args.append("-whitelist=noban@127.0.0.1")
self.supports_cli = False
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
@ -96,7 +95,7 @@ class PSBTTest(BitcoinTestFramework):
signed_psbt_obj.g.map[PSBT_GLOBAL_UNSIGNED_TX] = bytes.fromhex(raw)
# Check that the walletprocesspsbt call succeeds but also recognizes that the transaction is not complete
signed_psbt_incomplete = wallet.walletprocesspsbt(signed_psbt_obj.to_base64(), finalize=False)
signed_psbt_incomplete = wallet.walletprocesspsbt(psbt=signed_psbt_obj.to_base64(), finalize=False)
assert signed_psbt_incomplete["complete"] is False
def test_utxo_conversion(self):
@ -1209,7 +1208,8 @@ class PSBTTest(BitcoinTestFramework):
self.log.info("Test descriptorprocesspsbt raises if an invalid sighashtype is passed")
assert_raises_rpc_error(-8, "'all' is not a valid sighash parameter.", self.nodes[2].descriptorprocesspsbt, psbt, [descriptor], sighashtype="all")
self.test_sighash_mismatch()
if not self.options.usecli:
self.test_sighash_mismatch()
self.test_sighash_adding()
if __name__ == '__main__':