diff options
author | Jon Atack <jon@atack.com> | 2020-12-04 11:28:47 +0100 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2021-05-06 09:06:27 +0200 |
commit | ea6f76b66ecc52360719053489e0ec9f9a673eab (patch) | |
tree | 4dfb3f0ec253a4818bc661699a38d1ed3a4b2549 /test/functional/rpc_psbt.py | |
parent | 9c05da4a5c57d7fd0fc53817ad6f0a07c0f08b5b (diff) |
test: improve zero-value explicit fee rate coverage
Diffstat (limited to 'test/functional/rpc_psbt.py')
-rwxr-xr-x | test/functional/rpc_psbt.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py index 079a3bd3ba..2a2e6b9940 100755 --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -6,6 +6,8 @@ """ from decimal import Decimal +from itertools import product + from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_approx, @@ -199,8 +201,8 @@ class PSBTTest(BitcoinTestFramework): assert_approx(res4["fee"], 0.00000381, 0.0000001) self.log.info("Test min fee rate checks with walletcreatefundedpsbt are bypassed and that funding non-standard 'zero-fee' transactions is valid") - for param in ["fee_rate", "feeRate"]: - assert_equal(self.nodes[1].walletcreatefundedpsbt(inputs, outputs, 0, {param: 0, "add_inputs": True})["fee"], 0) + for param, zero_value in product(["fee_rate", "feeRate"], [0, 0.000, 0.00000000, "0", "0.000", "0.00000000"]): + assert_equal(0, self.nodes[1].walletcreatefundedpsbt(inputs, outputs, 0, {param: zero_value, "add_inputs": True})["fee"]) self.log.info("Test invalid fee rate settings") for param, value in {("fee_rate", 100000), ("feeRate", 1)}: |