Пример #1
0
 def test_load_all_by_gameday(self):
     players = Player.load_all_by_gameday(season=11, day=99)
     assert isinstance(players, dict)
     assert len(players) > 0
     for key, player in players.items():
         assert isinstance(key, str)
         assert isinstance(player, Player)
         assert key == player.id
Пример #2
0
 def test_load_all_by_gameday_bad_day_high(self):
     bad_day = Player.load_all_by_gameday(season=6, day=999)
     assert isinstance(bad_day, dict)
     assert len(bad_day) == 0
Пример #3
0
 def test_load_all_by_gameday_bad_day_low(self):
     with pytest.raises(ValueError):
         bad_day = Player.load_all_by_gameday(season=6, day=-1)
Пример #4
0
 def test_load_all_by_gameday_bad_season_high(self):
     bad_season = Player.load_all_by_gameday(season=999, day=5)
     assert isinstance(bad_season, dict)
     assert len(bad_season) == 0