Exemplo n.º 1
0
def session_block_56160(setting_name):
    """
    Common fixture with the data of block 56160
    """
    add_block(setting_name, 56160)
    session = Session(setting_name)
    push_session(session=session)
Exemplo n.º 2
0
def cli(ctx, settings):
    """:code:`ether_sql` is the most basic CLI group with 4 subsequent
    commands."""
    if ctx.obj is None:
        ctx.obj = {}

    logger.debug('settings')
    ctx.obj['session'] = Session(settings=settings)
Exemplo n.º 3
0
def session_first_10_blocks(setting_name):
    """
    Common fixture which creates missing blocks in the database
    """
    runner = CliRunner()
    runner.invoke(cli, [
        '--settings', setting_name, 'scrape_block_range', '--end_block_number',
        10
    ])
    session = Session(setting_name)
    push_session(session=session)
Exemplo n.º 4
0
def session_block_range_56160_56170(setting_name):
    """
    Common fixture with data between block 56160 and 56170
    """
    runner = CliRunner()
    runner.invoke(cli, [
        '--settings', setting_name, 'scrape_block_range',
        '--start_block_number', 56160, '--end_block_number', 56170,
        '--no-fill_gaps'
    ])
    session = Session(setting_name)
    push_session(session=session)
Exemplo n.º 5
0
def session_missing_blocks(setting_name):
    """
    Common fixture which creates missing blocks in the database
    """
    add_block(setting_name, 0)
    add_block(setting_name, 2)
    add_block(setting_name, 4)
    runner = CliRunner()
    runner.invoke(cli, [
        '--settings', setting_name, 'scrape_block_range', '--end_block_number',
        10, '--no-fill_gaps'
    ])
    session = Session(setting_name)
    push_session(session=session)
Exemplo n.º 6
0
def listening_to_node(setting_name):
    session = Session(setting_name)
    listening = session.w3.isConnected()
    assert listening is True
Exemplo n.º 7
0
def parity_session(parity_settings):
    """
    Parity test session with created but empty tables
    """
    infura_session = Session(parity_settings)
    return infura_session
Exemplo n.º 8
0
def cli(ctx, settings):
    """:code:`ether_sql` is the most basic CLI group with 4 subsequent
    commands."""
    current_session = Session(setting_name=settings)
    push_session(current_session)
Exemplo n.º 9
0
def infura_session(infura_settings):
    """
    Infura session with created but empty tables
    """
    infura_session = Session(infura_settings)
    return infura_session