Example #1
0
def test_ca_statewide_totals_18(dbname):
    assert (e.contest_total(
        "2018 General",
        "California",
        "US Senate CA",
        dbname=dbname,
    ) == 11113364)
Example #2
0
def test_presidential(dbname):
    assert (e.contest_total(
        election,
        jurisdiction,
        f"US President ({abbr})",
        dbname=dbname,
    ) == total_pres_votes)
Example #3
0
def test_state_senate_totals(dbname):
    assert (e.contest_total(
        election,
        jurisdiction,
        f"{abbr} Senate District {ssd}",
        dbname=dbname,
    ) == total_ssd_votes)
Example #4
0
def donttest_state_house_totals(dbname):
    assert (e.contest_total(
        "2020 General",
        f"{jurisdiction}",
        f"{abbr} House District 1",
        dbname=dbname,
    ) == -1)
Example #5
0
def test_house_totals(dbname):
    assert (e.contest_total(
        "2018 General",
        "Illinois",
        "IL House District 10",
        dbname=dbname,
    ) == 31649)
Example #6
0
def test_presidential(dbname):
    assert (e.contest_total(
        "2020 General",
        f"{jurisdiction}",
        f"US President ({abbr})",
        dbname=dbname,
    ) == 803810)
Example #7
0
def donttest_congressional_totals(dbname):
    assert (e.contest_total(
        "2020 General",
        f"{jurisdiction}",
        f"US House {abbr} District 1",
        dbname=dbname,
    ) == -1)
Example #8
0
def test_president_dem(dbname):
    assert (e.contest_total(
        election,
        jurisdiction,
        "US President (PA) (Phila) (Democratic Party)",
        dbname=dbname,
    ) == 304190)
Example #9
0
def test_state_senate_dem(dbname):
    assert (e.contest_total(
        election,
        jurisdiction,
        "PA Senate District 1 (Phila) (Democratic Party)",
        dbname=dbname,
    ) == 62840)
Example #10
0
def test_state_house_totals(dbname):
    assert (e.contest_total(
        election,
        jurisdiction,
        f"{abbr} House District 116",
        dbname=dbname,
    ) == 25615)
Example #11
0
def test_attorney_general_dem(dbname):
    assert (e.contest_total(
        election,
        jurisdiction,
        "PA Attorney General (Phila) (Democratic Party)",
        dbname=dbname,
    ) == 228504)
Example #12
0
def test_state_senate_totals(dbname):
    assert (e.contest_total(
        election,
        jurisdiction,
        f"{abbr} Senate District 35",
        dbname=dbname,
    ) == 122414)
Example #13
0
def test_congressional_totals(dbname):
    assert (e.contest_total(
        election,
        jurisdiction,
        f"US House {abbr} District 16",
        dbname=dbname,
    ) == 315704)
Example #14
0
def test_statewide_totals(dbname):
    assert (e.contest_total(
        election,
        jurisdiction,
        f"{abbr} Auditor General",
        dbname=dbname,
    ) == 6274473)
Example #15
0
def test_state_rep_totals(dbname):
    assert (e.contest_total(
        "2018 General",
        "Texas",
        "TX House District 25",
        dbname=dbname,
    ) == 40902)
Example #16
0
def test_state_rep_republican(dbname):
    assert (e.contest_total(
        election,
        jurisdiction,
        "PA House District 184 (Phila) (Republican Party)",
        dbname=dbname,
    ) == 1192)
Example #17
0
def test_senate_totals(dbname):
    assert (e.contest_total(
        "2018 General",
        "Texas",
        "US Senate TX",
        dbname=dbname,
    ) == 8371655)
Example #18
0
def test_state_treasurer_republican(dbname):
    assert (e.contest_total(
        election,
        jurisdiction,
        "PA Treasurer (Phila) (Republican Party)",
        dbname=dbname,
    ) == 21082)
Example #19
0
def test_senate_totals(dbname):
    assert (e.contest_total(
        "2020 General",
        f"{jurisdiction}",
        f"US Senate {abbr}",
        dbname=dbname,
    ) == 777986)
Example #20
0
def test_mn_senate_totals_18(dbname):
    assert (e.contest_total(
        "2018 General",
        "Minnesota",
        "MN Senate District 13",
        dbname=dbname,
    ) == 37842)
Example #21
0
def test_statewide_totals(dbname):
    assert (e.contest_total(
        "2020 General",
        f"{jurisdiction}",
        f"{abbr} Governor",
        dbname=dbname,
    ) == 798716)
Example #22
0
def test_mn_house_totals_18(dbname):
    assert (e.contest_total(
        "2018 General",
        "Minnesota",
        "MN House District 13A",
        dbname=dbname,
    ) == 18601)
Example #23
0
def test_senate_totals(dbname):
    assert (e.contest_total(
        "2018 General",
        "Illinois",
        "IL Senate District 14",
        dbname=dbname,
    ) == 65275)
Example #24
0
def test_mn_statewide_totals_18(dbname):
    assert (e.contest_total(
        "2018 General",
        "Minnesota",
        "MN Governor",
        dbname=dbname,
    ) == 2587287)
Example #25
0
def test_statewide_totals(dbname):
    assert (e.contest_total(
        "2018 General",
        "Illinois",
        "IL Governor",
        dbname=dbname,
    ) == 4547657)
Example #26
0
def test_governor_totals(dbname):
    assert (e.contest_total(
        "2018 General",
        "Texas",
        "TX Governor",
        dbname=dbname,
    ) == 8343443)
Example #27
0
def test_congressional_totals(dbname):
    assert (e.contest_total(
        election,
        jurisdiction,
        f"US House {abbr} District {cd}",
        dbname=dbname,
    ) == total_cd_votes)
Example #28
0
def test_state_senate_totals(dbname):
    assert (e.contest_total(
        "2018 General",
        "Texas",
        "TX Senate District 15",
        dbname=dbname,
    ) == 234763)
Example #29
0
def test_state_house_totals(dbname):
    assert (e.contest_total(
        election,
        jurisdiction,
        f"{abbr} House District {shd}",
        dbname=dbname,
    ) == total_shd_votes)
Example #30
0
def test_ca_rep_18(dbname):
    assert (e.contest_total(
        "2018 General",
        "California",
        "CA House District 60",
        dbname=dbname,
    ) == 125660)