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()
async def block(): c = Client('TestApiKey') yield c.block await c.close()
def test_api_key(): with pytest.raises(TypeError): c = Client()
async def account(): c = Client('TestApiKey') yield c.account await c.close()
async def client(): c = Client('TestApiKey') yield c await c.close()
async def proxy(): c = Client('TestApiKey') yield c.proxy await c.close()
async def stats(): c = Client('TestApiKey') yield c.stats await c.close()
async def logs(): c = Client('TestApiKey') yield c.logs await c.close()
async def contract(): c = Client('TestApiKey') yield c.contract await c.close()
async def transaction(): c = Client('TestApiKey') yield c.transaction await c.close()