diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-02-10 12:04:50 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-02-10 12:08:07 +0100 |
commit | d48ce48093faf1a0778b424397a2879a93e5fb5e (patch) | |
tree | 46c66a3c288b70603cb2b7069e57b6ad9e7f6e75 /qa | |
parent | a9565863e09a32729bd6ce33f31889099b3d75cb (diff) | |
parent | 2c0f901ea90e3efab5e15abeba011597cfdd92c1 (diff) |
Merge #5548: [REST] add /rest/chaininfos
2c0f901 [REST] rest/chaininfos add documentation (Jonas Schnelli)
59582c8 [REST] add /rest/chaininfos (Jonas Schnelli)
Diffstat (limited to 'qa')
-rwxr-xr-x | qa/rpc-tests/rest.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/qa/rpc-tests/rest.py b/qa/rpc-tests/rest.py index 704d889739..a9d41cf367 100755 --- a/qa/rpc-tests/rest.py +++ b/qa/rpc-tests/rest.py @@ -78,7 +78,7 @@ class RESTTest (BitcoinTestFramework): # check hex format response hex_string = http_get_call(url.hostname, url.port, '/rest/tx/'+tx_hash+self.FORMAT_SEPARATOR+"hex", True) - assert_equal(response.status, 200) + assert_equal(hex_string.status, 200) assert_greater_than(int(response.getheader('content-length')), 10) # check block tx details @@ -106,5 +106,12 @@ class RESTTest (BitcoinTestFramework): for tx in txs: assert_equal(tx in json_obj['tx'], True) + #test rest bestblock + bb_hash = self.nodes[0].getbestblockhash() + + json_string = http_get_call(url.hostname, url.port, '/rest/chaininfo.json') + json_obj = json.loads(json_string) + assert_equal(json_obj['bestblockhash'], bb_hash) + if __name__ == '__main__': RESTTest ().main () |