Пример #1
0
    def test_conference_with_no_names_is_empty(self, *args, **kwargs):
        flexmock(Conference) \
            .should_receive('_get_team_abbreviation') \
            .and_return('')

        conference = Conference('big-12')

        assert len(conference._teams) == 0
Пример #2
0
    def test_invalid_conference_year_reverts_to_previous_year(
            self, *args, **kwargs):
        flexmock(utils) \
            .should_receive('_find_year_for_season') \
            .and_return(2019)

        conference = Conference('big-12')

        assert len(conference._teams) == 10
Пример #3
0
 def test_conference_integration_bad_url(self, *args, **kwargs):
     with pytest.raises(ValueError):
         conference = Conference('BAD')
Пример #4
0
    def test_conference_string_representation(self, *args, **kwargs):
        conference = Conference('big-12')

        assert conference.__repr__() == 'big-12 - NCAAB'