def test_list_coach_team(): """Test that CoachTeams/<edition> returns a list of coach_team object""" url = helpertest.apirooturl() + "/CoachTeams/" + helpertest.edition() helpertest.check_dict_element(url, check_coach_team)
def test_ranking_by_casualties(): """ Test that ranking/coach/casualties/<edition> returns an array of coach and the first one has most casualties""" url = helpertest.apirooturl( ) + "/ranking/coach/casualties/" + helpertest.edition() _test_ranking_element_by_property(url, check_rank, "casualtiesFor")
def test_edition_one(): """Test that Edition/1 return an edition object""" url = helpertest.apirooturl() + "/Edition/" + helpertest.edition() helpertest.check_element(url, check_edition)
def test_main_ranking(): """ Test that ranking/coach/main/<edition> returns an array of coach and that first coach is coach_29""" url = helpertest.apirooturl( ) + "/ranking/coach/main/" + helpertest.edition() _test_ranking_elt(url, "coach_29", check_rank)
def test_ranking_by_touchdown(): """ Test that ranking/coach/td/<edition> returns an array of coach and the first one has most td""" url = helpertest.apirooturl() + "/ranking/coach/td/" + helpertest.edition() _test_ranking_element_by_property(url, check_rank, "tdFor")
def test_team_ranking_by_comeback(): """ Test that ranking/coachTeam/comeback/<edition> returns an array of team ranking and the first one has most win ranks""" url = helpertest.apirooturl( ) + "/ranking/coachTeam/comeback/" + helpertest.edition() _test_ranking_element_by_property(url, check_team_rank, "diffRanking")
def test_team_ranking_by_defense(): """ Test that ranking/coachTeam/defense/<edition> returns an array of team ranking and the first one has least td against """ url = helpertest.apirooturl( ) + "/ranking/coachTeam/defense/" + helpertest.edition() _test_ranking_element_by_defense(url, check_team_rank)
def test_team_ranking_by_fouls(): """ Test that ranking/coachTeam/fouls/<edition> returns an array of team ranking and the first one has most fouls""" url = helpertest.apirooturl( ) + "/ranking/coachTeam/fouls/" + helpertest.edition() _test_ranking_element_by_property(url, check_team_rank, "foulsFor")
def test_team_ranking(): """ Test that ranking/coachTeam/main/<edition> returns an array of coach_team and that first coach_team is coach_team_8""" url = helpertest.apirooturl( ) + "/ranking/coachTeam/main/" + helpertest.edition() _test_ranking_elt(url, "coach_team_8", check_team_rank)
def test_to_play_matchs_empty(): """Test that ToPlayMatchs/<edition>/<round> returns a list of match object""" url = helpertest.apirooturl() + "/ToPlayMatchs/" + helpertest.edition( ) + "/1" helpertest.check_empty_list(url)
def test_to_play_matchs(): """Test that ToPlayMatchs/<edition>/<round> returns a list of match object""" url = helpertest.apirooturl() + "/ToPlayMatchs/" + helpertest.edition( ) + "/5" helpertest.check_list_element(url, assert_to_play_match_edition_1_round_5)
def test_list_match(): """Test that Matchs/<edition>/<round> returns a list of match object""" url = helpertest.apirooturl() + "/Matchs/" + helpertest.edition() + "/1" helpertest.check_list_element(url, assert_match_edition_1_round_1)