Ejemplo n.º 1
0
def test_fiat_multiple_coins(mocker, caplog):
    fiat_convert = CryptoToFiatConverter()
    fiat_convert._coinlistings = [
        {'id': 'helium', 'symbol': 'hnt', 'name': 'Helium'},
        {'id': 'hymnode', 'symbol': 'hnt', 'name': 'Hymnode'},
        {'id': 'bitcoin', 'symbol': 'btc', 'name': 'Bitcoin'},
        {'id': 'ethereum', 'symbol': 'eth', 'name': 'Ethereum'},
        {'id': 'ethereum-wormhole', 'symbol': 'eth', 'name': 'Ethereum Wormhole'},
    ]

    assert fiat_convert._get_gekko_id('btc') == 'bitcoin'
    assert fiat_convert._get_gekko_id('hnt') is None
    assert fiat_convert._get_gekko_id('eth') == 'ethereum'

    assert log_has('Found multiple mappings in goingekko for hnt.', caplog)
Ejemplo n.º 2
0
def test_loadcryptomap(mocker):

    fiat_convert = CryptoToFiatConverter()
    assert len(fiat_convert._coinlistings) == 2

    assert fiat_convert._get_gekko_id("btc") == "bitcoin"