Ejemplo n.º 1
0
    def test_dehydrate_rating(self):
        self.create_switch('iarc')

        for rating in ratingsbodies.ALL_RATINGS():
            rating = ratingsbodies.dehydrate_rating(rating)
            assert isinstance(rating.name, unicode)
            assert rating.label
            assert isinstance(rating.description, unicode)
Ejemplo n.º 2
0
    def test_all_ratings(self):
        ratings = ratingsbodies.ALL_RATINGS()

        # Assert all ratings bodies are present.
        assert ratingsbodies.CLASSIND_L in ratings
        assert ratingsbodies.GENERIC_3 in ratings
        assert ratingsbodies.ESRB_E in ratings
        assert ratingsbodies.PEGI_3 in ratings
        assert ratingsbodies.USK_0 in ratings
Ejemplo n.º 3
0
    def test_all_ratings_waffle_off(self):
        ratings = ratingsbodies.ALL_RATINGS()

        # Assert only CLASSIND and GENERIC ratings are present.
        assert ratingsbodies.CLASSIND_L in ratings
        assert ratingsbodies.GENERIC_3 in ratings
        assert ratingsbodies.ESRB_E not in ratings
        assert ratingsbodies.PEGI_3 not in ratings
        assert ratingsbodies.USK_0 not in ratings
Ejemplo n.º 4
0
    def test_all_ratings_waffle_on(self):
        self.create_switch('iarc')
        ratings = ratingsbodies.ALL_RATINGS()

        # Assert all ratings bodies are present.
        assert ratingsbodies.CLASSIND_L in ratings
        assert ratingsbodies.GENERIC_3 in ratings
        assert ratingsbodies.ESRB_E in ratings
        assert ratingsbodies.PEGI_3 in ratings
        assert ratingsbodies.USK_0 in ratings
Ejemplo n.º 5
0
    def test_dehydrate_rating(self):

        for rating in ratingsbodies.ALL_RATINGS():
            rating = ratingsbodies.dehydrate_rating(rating)
            assert isinstance(rating.name, unicode), rating
            assert rating.label and rating.label != str(None), rating