def test_simple_athena():
    simple_athena = Athena(.1, 2**31 - 1, .1, default_contest)
    assert simple_athena.alpha == .1
    assert simple_athena.beta == 0.0
    assert simple_athena.delta == 2**31 - 1
    assert simple_athena.max_fraction_to_draw == .1
    assert len(simple_athena.rounds) == 0
    assert len(simple_athena.sub_audits['a-b'].min_winner_ballots) == 0
    assert simple_athena.get_risk_level() is None
def test_athena_execute_round():
    contest = Contest(100000, {
        'A': 75000,
        'B': 25000
    }, 1, ['A'], ContestType.MAJORITY)
    athena = Athena(.1, 1, .1, contest)
    assert not athena.execute_round(50, {'A': 31, 'B': 19})
    assert not athena.stopped
    assert athena.sample_ballots['A'] == [31]
    assert athena.sample_ballots['B'] == [19]
    assert not athena.sub_audits['A-B'].stopped
    assert athena.rounds == [50]
    assert athena.execute_round(100, {'A': 70, 'B': 30})
    assert athena.stopped
    assert athena.sample_ballots['A'] == [31, 70]
    assert athena.sample_ballots['B'] == [19, 30]
    assert athena.sub_audits['A-B'].stopped
    assert athena.rounds == [50, 100]
    assert athena.get_risk_level() < 0.1