Ejemplo n.º 1
0
 def latest_block(self):
     return get_latest_block_number(self.default_symbol, self.testnet)
Ejemplo n.º 2
0
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')
Ejemplo n.º 3
0
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')
Ejemplo n.º 4
0
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/')