Exemplo n.º 1
0
async def test_networks():
    with patch('aioetherscan.network.Network._set_network') as m:
        c = Client('TestApiKey')
        m.assert_called_once_with('eth', 'main')
        await c.close()

    with patch('aioetherscan.network.Network._set_network') as m:
        c = Client('TestApiKey', 'eth', 'kovan')
        m.assert_called_once_with('eth', 'kovan')
        await c.close()
Exemplo n.º 2
0
async def block():
    c = Client('TestApiKey')
    yield c.block
    await c.close()
Exemplo n.º 3
0
def test_api_key():
    with pytest.raises(TypeError):
        c = Client()
Exemplo n.º 4
0
async def account():
    c = Client('TestApiKey')
    yield c.account
    await c.close()
Exemplo n.º 5
0
async def client():
    c = Client('TestApiKey')
    yield c
    await c.close()
Exemplo n.º 6
0
async def proxy():
    c = Client('TestApiKey')
    yield c.proxy
    await c.close()
Exemplo n.º 7
0
async def stats():
    c = Client('TestApiKey')
    yield c.stats
    await c.close()
Exemplo n.º 8
0
async def logs():
    c = Client('TestApiKey')
    yield c.logs
    await c.close()
Exemplo n.º 9
0
async def contract():
    c = Client('TestApiKey')
    yield c.contract
    await c.close()
Exemplo n.º 10
0
async def transaction():
    c = Client('TestApiKey')
    yield c.transaction
    await c.close()