def latest_block(self): return get_latest_block_number(self.default_symbol, self.testnet)
def test_get_latest_block_cryptoid(clove_req_json_mock): latest_block_number = get_latest_block_number('LTC') assert latest_block_number == 1234 clove_req_json_mock.assert_called_with( 'https://chainz.cryptoid.info/ltc/api.dws?q=getblockcount')
def test_get_latest_block_ravencoin(clove_req_json_mock): latest_block_number = get_latest_block_number('RVN') assert latest_block_number == 1234 clove_req_json_mock.assert_called_with( 'http://raven-blockchain.info/api/getblockcount')
def test_get_latest_block_blockcypher(clove_req_json_mock): latest_block_number = get_latest_block_number('BTC', testnet=True) assert latest_block_number == 1234 clove_req_json_mock.assert_called_with( 'https://api.blockcypher.com/v1/btc/test3/')