def test_parse_urls(self):
     page = DailyBoxScoresPage(
         html=html.fromstring(self.january_01_2017_box_scores))
     urls = page.game_url_paths
     self.assertEqual(len(urls), 5)
     self.assertEqual(urls[0], '/boxscores/201701010ATL.html')
     self.assertEqual(urls[1], '/boxscores/201701010IND.html')
     self.assertEqual(urls[2], '/boxscores/201701010LAL.html')
     self.assertEqual(urls[3], '/boxscores/201701010MIA.html')
     self.assertEqual(urls[4], '/boxscores/201701010MIN.html')
def team_box_scores(day, month, year):
    url = "{BASE_URL}/boxscores/".format(BASE_URL=BASE_URL)

    response = requests.get(url=url, params={"day": day, "month": month, "year": year})

    response.raise_for_status()

    page = DailyBoxScoresPage(html=html.fromstring(response.content))

    return [
        box_score
        for game_url_path in page.game_url_paths
        for box_score in team_box_score(game_url_path=game_url_path)
    ]
 def test_game_url_paths_query(self):
     page = DailyBoxScoresPage(
         html=html.fromstring(self.january_01_2017_box_scores))
     self.assertEqual(page.game_url_paths_query,
                      '//td[contains(@class, "gamelink")]/a')