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:
kevkevin
2024-02-27 19:41:12 -06:00
committed by kevkevinpal
parent 930b237f16
commit 7bb83f6718
41 changed files with 137 additions and 83 deletions

View File

@@ -7,7 +7,10 @@ Test that -discover does not add all interfaces' addresses if we listen on only
"""
from test_framework.test_framework import BitcoinTestFramework, SkipTest
from test_framework.util import assert_equal
from test_framework.util import (
assert_equal,
assert_not_equal,
)
# We need to bind to a routable address for this test to exercise the relevant code
# and also must have another routable address on another interface which must not
@@ -71,7 +74,7 @@ class BindPortDiscoverTest(BitcoinTestFramework):
if local['address'] == ADDR1:
found_addr1 = True
assert_equal(local['port'], BIND_PORT)
assert local['address'] != ADDR2
assert_not_equal(local['address'], ADDR2)
assert found_addr1
if __name__ == '__main__':