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

@@ -19,6 +19,7 @@ from test_framework.messages import (
from test_framework.p2p import P2PInterface
from test_framework.util import (
assert_equal,
assert_not_equal,
assert_raises_rpc_error,
)
from test_framework.test_framework import BitcoinTestFramework
@@ -110,7 +111,7 @@ class OrphanRPCsTest(BitcoinTestFramework):
assert tx_in_orphanage(node, tx_child_2["tx"])
self.log.info("Check that orphan 1 and 2 were from different peers")
assert orphanage[0]["from"][0] != orphanage[1]["from"][0]
assert_not_equal(orphanage[0]["from"][0], orphanage[1]["from"][0])
peer_ids = [orphanage[0]["from"][0], orphanage[1]["from"][0]]
self.log.info("Unorphan child 2")