aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_psbt.py
diff options
context:
space:
mode:
authorLeonardo Araujo <leonardo.aa88@gmail.com>2022-10-04 13:51:24 -0300
committerLeonardo Araujo <leonardo.aa88@gmail.com>2022-10-10 18:08:00 -0300
commit2dede9f67596787e18904d3d5961f48ec75f241e (patch)
tree81472b4316cf093e3abcf3c61a526c3d1c346e46 /test/functional/rpc_psbt.py
parent9ca39d69dfe03c19662867c3d53a5e6e41277d4a (diff)
downloadbitcoin-2dede9f67596787e18904d3d5961f48ec75f241e.tar.xz
Adjust RPCTypeCheckObj error string
Diffstat (limited to 'test/functional/rpc_psbt.py')
-rwxr-xr-xtest/functional/rpc_psbt.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py
index 4583ca25cf..30d476530a 100755
--- a/test/functional/rpc_psbt.py
+++ b/test/functional/rpc_psbt.py
@@ -272,7 +272,7 @@ class PSBTTest(BitcoinTestFramework):
self.log.info("- raises RPC error with invalid estimate_mode settings")
for k, v in {"number": 42, "object": {"foo": "bar"}}.items():
- assert_raises_rpc_error(-3, "Expected type string for estimate_mode, got {}".format(k),
+ assert_raises_rpc_error(-3, f"JSON value of type {k} for field estimate_mode is not of expected type string",
self.nodes[1].walletcreatefundedpsbt, inputs, outputs, 0, {"estimate_mode": v, "conf_target": 0.1, "add_inputs": True})
for mode in ["", "foo", Decimal("3.141592")]:
assert_raises_rpc_error(-8, 'Invalid estimate_mode parameter, must be one of: "unset", "economical", "conservative"',
@@ -282,7 +282,7 @@ class PSBTTest(BitcoinTestFramework):
for mode in ["unset", "economical", "conservative"]:
self.log.debug("{}".format(mode))
for k, v in {"string": "", "object": {"foo": "bar"}}.items():
- assert_raises_rpc_error(-3, "Expected type number for conf_target, got {}".format(k),
+ assert_raises_rpc_error(-3, f"JSON value of type {k} for field conf_target is not of expected type number",
self.nodes[1].walletcreatefundedpsbt, inputs, outputs, 0, {"estimate_mode": mode, "conf_target": v, "add_inputs": True})
for n in [-1, 0, 1009]:
assert_raises_rpc_error(-8, "Invalid conf_target, must be between 1 and 1008", # max value of 1008 per src/policy/fees.h