mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-03 17:54:19 +02:00
test: create assert_not_equal util and add to where imports are needed
In the functional tests there are lots of cases where we assert != which this new util will replace, we also are adding the imports and the new assertion
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
from test_framework.address import address_to_scriptpubkey
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
assert_not_equal,
|
||||
assert_approx,
|
||||
assert_equal,
|
||||
assert_raises_rpc_error,
|
||||
@@ -166,7 +167,7 @@ class AvoidReuseTest(BitcoinTestFramework):
|
||||
# Make sure it's starting out as change as expected
|
||||
assert node.getaddressinfo(changeaddr)['ischange']
|
||||
for logical_tx in node.listtransactions():
|
||||
assert logical_tx.get('address') != changeaddr
|
||||
assert_not_equal(logical_tx.get('address'), changeaddr)
|
||||
|
||||
# Spend it
|
||||
reset_balance(node, node.getnewaddress())
|
||||
@@ -174,7 +175,7 @@ class AvoidReuseTest(BitcoinTestFramework):
|
||||
# It should still be change
|
||||
assert node.getaddressinfo(changeaddr)['ischange']
|
||||
for logical_tx in node.listtransactions():
|
||||
assert logical_tx.get('address') != changeaddr
|
||||
assert_not_equal(logical_tx.get('address'), changeaddr)
|
||||
|
||||
def test_sending_from_reused_address_without_avoid_reuse(self):
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user