예제 #1
0
    def test_ncaaf_schedule_returns_schedule(self):
        flexmock(Schedule) \
            .should_receive('_pull_schedule') \
            .and_return(None)

        team = Team(None, 1)

        assert len(team.schedule) == 0
예제 #2
0
    def test_roster_from_team_class(self, *args, **kwargs):
        flexmock(Team) \
            .should_receive('_parse_team_data') \
            .and_return(None)
        team = Team(None, 1, '2018')
        mock_abbreviation = mock.PropertyMock(return_value='PURDUE')
        type(team)._abbreviation = mock_abbreviation

        assert len(team.roster.players) == 2

        for player in team.roster.players:
            assert player.name in ['David Blough', 'Rondale Moore']
        type(team)._abbreviation = None
    def test_pulling_team_directly(self, *args, **kwargs):
        purdue = Team('PURDUE')

        for attribute, value in self.results.items():
            assert getattr(purdue, attribute) == value
예제 #4
0
    def test_team_string_representation(self, *args, **kwargs):
        purdue = Team('PURDUE')

        assert purdue.__repr__() == 'Purdue (PURDUE) - 2017'
예제 #5
0
    def setup_method(self, *args, **kwargs):
        flexmock(Team) \
            .should_receive('_parse_team_data') \
            .and_return(None)

        self.team = Team(None)