1 #!/usr/bin/env python3
2 # Copyright (c) 2017-present The Bitcoin Core developers
3 # Distributed under the MIT software license, see the accompanying
4 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 """Test deprecation of RPC calls."""
6 from test_framework.test_framework import BitcoinTestFramework
7 8 class DeprecatedRpcTest(BitcoinTestFramework):
9 def set_test_params(self):
10 self.num_nodes = 1
11 self.setup_clean_chain = True
12 self.extra_args = [[]]
13 self.uses_wallet = None
14 15 def run_test(self):
16 # This test should be used to verify the errors of the currently
17 # deprecated RPC methods (without the -deprecatedrpc flag) until
18 # such RPCs are fully removed. For example:
19 #
20 # self.log.info("Test generate RPC")
21 # assert_raises_rpc_error(-32, 'The wallet generate rpc method is deprecated', self.nodes[0].generate, 1)
22 #
23 # Please ensure that for all the RPC methods tested here, there is
24 # at least one other functional test that still tests the RPCs
25 # functionality using the respective -deprecatedrpc flag.
26 27 # Please don't delete nor modify this comment
28 self.log.info("Tests for deprecated RPC methods (if any)")
29 self.log.info("Currently no tests for deprecated RPC methods")
30 31 32 if __name__ == '__main__':
33 DeprecatedRpcTest(__file__).main()
34