Skip to content

Commit e009791

Browse files
committed
test: coverage for getbalances#total field in wallet_avoidreuse
1 parent 6cfb73e commit e009791

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/functional/wallet_avoidreuse.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,12 @@ def assert_unspent(node, total_count=None, total_sum=None, reused_supported=None
5959

6060
def assert_balances(node, mine, margin=0.001):
6161
'''Make assertions about a node's getbalances output'''
62-
got = node.getbalances()["mine"]
62+
balances, total = node.getbalances(), 0
6363
for k,v in mine.items():
64-
assert_approx(got[k], v, margin)
64+
assert_approx(balances["mine"][k], v, margin)
65+
total += v
66+
assert_approx(balances["total"], total, margin)
67+
6568

6669
class AvoidReuseTest(BitcoinTestFramework):
6770
def add_options(self, parser):

0 commit comments

Comments
 (0)