test: convert simple equality asserts in excluded files
What changed, and why it matters
This commit only changes test code. It replaces plain Python assert statements with a custom assert_equal helper in two test files. There is no change to Bitcoin Core's production code, network behavior, wallet logic, or consensus rules, so it has no security impact on users.
No action needed; this is a benign test-only refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff converts straightforward equality assertions in test/functional/test_framework/authproxy.py and test/functional/wallet_bumpfee.py from raw assert to the project’s assert_equal utility. In authproxy.py the import is done locally to avoid an import cycle. This is a test-only refactoring step preparing files for a later scripted diff; no runtime or security-relevant logic is modified.
Changed components
test/functional/test_framework/authproxy.pytest/functional/wallet_bumpfee.pyInspect captured patch +4 / −3
diff --git a/test/functional/test_framework/authproxy.py b/test/functional/test_framework/authproxy.py
index a3eb0b05..078672c3 100644
--- a/test/functional/test_framework/authproxy.py
+++ b/test/functional/test_framework/authproxy.py
@@ -144,7 +144,8 @@ class AuthServiceProxy():
else:
return response['result']
else:
- assert response['jsonrpc'] == '2.0'
+ from .util import assert_equal
+ assert_equal(response['jsonrpc'], '2.0')
if status != HTTPStatus.OK:
raise JSONRPCException({
'code': -342, 'message': 'non-200 HTTP status code'}, status)
diff --git a/test/functional/wallet_bumpfee.py b/test/functional/wallet_bumpfee.py
index 4a6c45e7..80735e01 100755
--- a/test/functional/wallet_bumpfee.py
+++ b/test/functional/wallet_bumpfee.py
@@ -341,8 +341,8 @@ def test_simple_bumpfee_succeeds(self, mode, rbf_node, peer_node, dest_address):
assert_equal(bumpedwtx["replaces_txid"], rbfid)
# if this is a new_outputs test, check that outputs were indeed replaced
if mode == "new_outputs":
- assert len(bumpedwtx["details"]) == 1
- assert bumpedwtx["details"][0]["address"] == new_address
+ assert_equal(len(bumpedwtx["details"]), 1)
+ assert_equal(bumpedwtx["details"][0]["address"], new_address)
self.clear_mempool()
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.