mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-15 10:07:41 +02:00
test: convert simple equality asserts in excluded files
A few files still need to stay out of the later scripted diff because they contain more complicated assert shapes. Convert the straightforward equality checks in those files by hand first. Use a local import in `authproxy.py` so the change does not create an import cycle.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user