Skip to content

Commit

Permalink
Update functional test DeprecatedRpcTest
Browse files Browse the repository at this point in the history
  • Loading branch information
panleone authored and Fuzzbawls committed Mar 5, 2023
1 parent 1c300a2 commit e7437c9
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions test/functional/rpc_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"""Test deprecation of RPC calls."""

from test_framework.test_framework import PivxTestFramework
from test_framework.util import assert_raises_rpc_error
# from test_framework.util import assert_raises_rpc_error


class DeprecatedRpcTest(PivxTestFramework):
def set_test_params(self):
self.num_nodes = 2
self.setup_clean_chain = True
self.extra_args = [[], ["-deprecatedrpc=autocombinerewards"]]
# self.extra_args = [[], ["-deprecatedrpc=rpcname"]] add deprecated rpc here

def run_test(self):
# This test should be used to verify correct behaviour of deprecated
Expand All @@ -21,13 +21,7 @@ def run_test(self):
# self.log.info("Make sure that -deprecatedrpc=accounts allows it to take accounts")
# assert_raises_rpc_error(-32, "listaccounts is deprecated", self.nodes[0].listaccounts)
# self.nodes[1].listaccounts()

self.log.info("Test autocombinerewards deprecation")
# The autocombinerewards RPC method has been deprecated
assert_raises_rpc_error(-32, "autocombinerewards is deprecated", self.nodes[0].autocombinerewards, True, 500)
self.nodes[1].autocombinerewards(True, 500)

# self.log.info("No test cases to run") # remove this when adding any tests to this file
self.log.info("No test cases to run") # remove this when adding any tests to this file


if __name__ == '__main__':
Expand Down

0 comments on commit e7437c9

Please sign in to comment.