test: remove strict restrictions on rpc_deprecated

Removed the wallet restrictions for rpc_deprecated.py and added specific test case for the current deprecated rpc.
skip_test_if_missing_module will skip the whole test when the wallet is missing, even if a part of the test is non-wallet related.
This commit is contained in:
Pol Espinasa 2025-03-25 19:41:19 +01:00
parent dfb7d58108
commit 459807d566
No known key found for this signature in database
GPG key ID: 28470907B40BF26D

View file

@ -15,10 +15,6 @@ class DeprecatedRpcTest(BitcoinTestFramework):
self.setup_clean_chain = True
self.extra_args = [[]]
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
def run_test(self):
# This test should be used to verify the errors of the currently
# deprecated RPC methods (without the -deprecatedrpc flag) until
@ -31,7 +27,13 @@ class DeprecatedRpcTest(BitcoinTestFramework):
# at least one other functional test that still tests the RPCs
# functionality using the respective -deprecatedrpc flag.
self.log.info("Test settxfee RPC")
# Please don't delete nor modify this comment
self.log.info("Tests for deprecated RPC methods (if any)")
if self.is_wallet_compiled():
self.log.info("Tests for deprecated wallet-related RPC methods (if any)")
self.log.info("Test settxfee RPC deprecation")
self.nodes[0].createwallet("settxfeerpc")
assert_raises_rpc_error(-32, 'settxfee is deprecated and will be fully removed in v31.0.', self.nodes[0].rpc.settxfee, 0.01)
if __name__ == '__main__':