def test_riding_of_multiple_ridings() -> None: """Test Election.riding_of with multiple ridings""" e = Election(date(2000, 2, 8)) e.update_results('r1', 'ndp', 1) res1 = e.ridings_of() assert res1 == ['r1'] e.update_results('r2', 'ndp', 10) e.update_results('r3', 'ncp', 51) e.update_results('r4', 'nap', 14) res2 = e.ridings_of() assert res2 == ['r1', 'r2', 'r3', 'r4']
def test_riding_of_1_vote() -> None: """Test Election.riding_of with riding of 1 votes""" e = Election(date(2000, 2, 8)) e.update_results('r1', 'ndp', 1) res1 = e.ridings_of() assert res1 == ['r1'] e.update_results('r2', 'ndp', 1) e.update_results('r1', 'ncp', 1) e.update_results('r2', 'nap', 1) res2 = e.ridings_of() assert res2 == ['r1', 'r2']