diff --git a/espn_api/basketball/league.py b/espn_api/basketball/league.py index ebb8f94e..80ccfaed 100644 --- a/espn_api/basketball/league.py +++ b/espn_api/basketball/league.py @@ -28,7 +28,6 @@ def fetch_league(self): def _fetch_league(self): data = super()._fetch_league() - self.start_date = datetime.datetime.fromtimestamp(min([i[1][1]/1000 for i in self._get_pro_schedule(1).items()])).date() self._fetch_players() self._map_matchup_ids(data['schedule']) return(data) diff --git a/espn_api/hockey/league.py b/espn_api/hockey/league.py index 0fe84535..3f45316b 100644 --- a/espn_api/hockey/league.py +++ b/espn_api/hockey/league.py @@ -26,8 +26,6 @@ def fetch_league(self): def _fetch_league(self): data = super()._fetch_league() - self.start_date = datetime.datetime.fromtimestamp( - min([i[1][1] / 1000 for i in self._get_pro_schedule(1).items()])).date() self._fetch_players() self._map_matchup_ids(data['schedule']) return data diff --git a/espn_api/wbasketball/league.py b/espn_api/wbasketball/league.py index 2fdf6beb..8a819b65 100644 --- a/espn_api/wbasketball/league.py +++ b/espn_api/wbasketball/league.py @@ -27,7 +27,6 @@ def fetch_league(self): def _fetch_league(self): data = super()._fetch_league() - self.start_date = datetime.datetime.fromtimestamp(min([i[1][1]/1000 for i in self._get_pro_schedule(1).items()])).date() self._fetch_players() self._map_matchup_ids(data['schedule']) return(data) diff --git a/tests/hockey/integration/test_league.py b/tests/hockey/integration/test_league.py index b8495292..91136965 100644 --- a/tests/hockey/integration/test_league.py +++ b/tests/hockey/integration/test_league.py @@ -8,9 +8,8 @@ class LeagueTest(TestCase): def test_league_init(self): league = League(77421173, 2021) - self.assertEqual(league.start_date.year, 2021) - self.assertEqual(league.start_date.month, 1) - self.assertEqual(league.start_date.day, 13) + self.assertEqual(league.teams[0].__repr__(), 'Team(Cambridge Bay Caribou)') + self.assertEqual(league.teams[1].roster[0].name, 'Steven Stamkos') def test_blank_league_init(self): blank_league = League(77421173, 2021, fetch_league=False)