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

@@ -27,6 +27,7 @@ from test_framework.script import (
)
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_not_equal,
assert_equal,
assert_raises_rpc_error,
)
@@ -275,12 +276,12 @@ class CoinStatsIndexTest(BitcoinTestFramework):
res2 = index_node.gettxoutsetinfo(hash_type='muhash', hash_or_height=112)
assert_equal(res["bestblock"], block)
assert_equal(res["muhash"], res2["muhash"])
assert res["muhash"] != res_invalid["muhash"]
assert_not_equal(res["muhash"], res_invalid["muhash"])
# Test that requesting reorged out block by hash is still returning correct results
res_invalid2 = index_node.gettxoutsetinfo(hash_type='muhash', hash_or_height=reorg_block)
assert_equal(res_invalid2["muhash"], res_invalid["muhash"])
assert res["muhash"] != res_invalid2["muhash"]
assert_not_equal(res["muhash"], res_invalid2["muhash"])
# Add another block, so we don't depend on reconsiderblock remembering which
# blocks were touched by invalidateblock