def return_raw_events_html(season_start_year): raw_content = urllib2.urlopen( SeasonScheduleUrlGenerator.generate_url(season_start_year + 1)).read() schedule_html = html.fromstring(raw_content) raw_html_events = schedule_html.xpath('//div[@id="div_games"]//td') return raw_html_events
def test_expected(self): test_year = 2014 result = SeasonScheduleUrlGenerator.generate_url(test_year) expected_result = "http://www.basketball-reference.com/leagues/NBA_{0}_games.html".format(test_year) assert expected_result == result
def test_expected(self): test_year = 2014 result = SeasonScheduleUrlGenerator.generate_url(test_year) expected_result = "http://www.basketball-reference.com/leagues/NBA_{0}_games.html".format( test_year) assert expected_result == result