mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-28 17:12:58 +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,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__':
|
||||
|
Reference in New Issue
Block a user