def test_situation_codes(): pyball = PyBall() return pyball.get_situation_codes()
def test_get_season(): pyball = PyBall() with pytest.raises(NotImplementedError): pyball.get_seasons()
def test_get_season_took_too_long(): pyball = PyBall() with pytest.raises(TookTooLongError): pyball._get("{0}/seasons".format(BASE_URL))
def test_divisions(): pyball = PyBall() return pyball.get_divisions()
def test_standing_types(): pyball = PyBall() return pyball.get_standing_types()
def test_conferences(): pyball = PyBall() return pyball.get_conferences()
def test_conference(): pyball = PyBall() return pyball.get_conference_by_id(302)
def test_venue(): pyball = PyBall() return pyball.get_venue(1)
def test_league_leader_types(): pyball = PyBall() return pyball.get_league_leader_types()
def test_bad_venue_id(): pyball = PyBall() with pytest.raises(InvalidIdError): pyball.get_venue(-1)
def test_venue_id_not_a_num(): pyball = PyBall() with pytest.raises(BadRequestError): pyball.get_venue("not_an_id")
def test_metrics(): pyball = PyBall() return pyball.get_metrics()
def test_positions(): pyball = PyBall() return pyball.get_positions()
def test_stats_group(): pyball = PyBall() return pyball.get_stats_groups()
def test_get_team_affiliates(): pyball = PyBall() return pyball.get_team_affiliates(114)
def test_draft(): pyball = PyBall() return pyball.get_draft_by_year(2017)
def test_team_coaches(): pyball = PyBall() return pyball.get_teams_coaches(114)
def test_prospects(): pyball = PyBall() return pyball.get_draft_prospects_by_year(2017)
def test_bad_conference(): pyball = PyBall() with pytest.raises(BadRequestError): pyball.get_conference_by_id("InvalidID")
def test_bad_draft_year(): pyball = PyBall() with pytest.raises(BadRequestError): pyball.get_draft_by_year("BadYear")
def test_division(): pyball = PyBall() return pyball.get_division_by_id(201)
def test_get_not_implemented_draft_prospects(): pyball = PyBall() with pytest.raises(NotImplementedError): pyball.get_draft_prospects()
def test_bad_division(): pyball = PyBall() with pytest.raises(BadRequestError): pyball.get_division_by_id("InvalidID")
def test_get_not_found_draft_prospects(): pyball = PyBall() with pytest.raises(NotFound): pyball._get("{}/draft/prospects".format(BASE_URL))
def test_get_season_by_id_took_too_long(): pyball = PyBall() with pytest.raises(TookTooLongError): pyball._get("{0}/seasons/{1}".format(BASE_URL, "fall"))
def test_game_teams(): pyball = PyBall() return pyball.get_teams()
def test_get_season_by_id(): pyball = PyBall() with pytest.raises(NotImplementedError): pyball.get_season_by_id("AnyValue")
def test_game_teams_by_id(): pyball = PyBall() return pyball.get_team_by_id(114)
def league(): pyball = PyBall() league_id = pyball.get_teams()[0].league.id return pyball.get_league_by_id(league_id)
def test_schedule_event_types(): pyball = PyBall() return pyball.get_schedule_event_types()