Changeset View
Changeset View
Standalone View
Standalone View
test/functional/interface_rest.py
Show All 38 Lines | for vout in vouts: | ||||
if vout['value'] == value: | if vout['value'] == value: | ||||
yield vout['n'] | yield vout['n'] | ||||
class RESTTest (BitcoinTestFramework): | class RESTTest (BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.setup_clean_chain = True | self.setup_clean_chain = True | ||||
self.num_nodes = 2 | self.num_nodes = 2 | ||||
self.extra_args = [["-rest"], []] | # TODO: remove -txindex. Currently required for getrawtransaction call. | ||||
self.extra_args = [["-rest", "-txindex"], []] | |||||
def skip_test_if_missing_module(self): | def skip_test_if_missing_module(self): | ||||
self.skip_if_no_wallet() | self.skip_if_no_wallet() | ||||
def test_rest_request(self, uri, http_method='GET', req_type=ReqType.JSON, | def test_rest_request(self, uri, http_method='GET', req_type=ReqType.JSON, | ||||
body='', status=200, ret_type=RetType.JSON): | body='', status=200, ret_type=RetType.JSON): | ||||
rest_uri = '/rest' + uri | rest_uri = '/rest' + uri | ||||
if req_type == ReqType.JSON: | if req_type == ReqType.JSON: | ||||
▲ Show 20 Lines • Show All 284 Lines • Show Last 20 Lines |