diff options
author | Leonardo Araujo <leonardo.aa88@gmail.com> | 2022-10-04 13:51:24 -0300 |
---|---|---|
committer | Leonardo Araujo <leonardo.aa88@gmail.com> | 2022-10-10 18:08:00 -0300 |
commit | 2dede9f67596787e18904d3d5961f48ec75f241e (patch) | |
tree | 81472b4316cf093e3abcf3c61a526c3d1c346e46 /test/functional/rpc_fundrawtransaction.py | |
parent | 9ca39d69dfe03c19662867c3d53a5e6e41277d4a (diff) | |
download | bitcoin-2dede9f67596787e18904d3d5961f48ec75f241e.tar.xz |
Adjust RPCTypeCheckObj error string
Diffstat (limited to 'test/functional/rpc_fundrawtransaction.py')
-rwxr-xr-x | test/functional/rpc_fundrawtransaction.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/rpc_fundrawtransaction.py b/test/functional/rpc_fundrawtransaction.py index 17c6fce9c2..c6874f46de 100755 --- a/test/functional/rpc_fundrawtransaction.py +++ b/test/functional/rpc_fundrawtransaction.py @@ -793,7 +793,7 @@ class RawTransactionsTest(BitcoinTestFramework): self.log.info("Test fundrawtxn 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", node.fundrawtransaction, rawtx, {"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"', @@ -803,7 +803,7 @@ class RawTransactionsTest(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", node.fundrawtransaction, rawtx, {"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 |