"""Categories collected but not shown.

Rian, 11 Sep: skincare and confectionery are outside the launch scope. They keep being
collected (the data is cheap and may matter later) but must not appear anywhere Adam
would read as a promise: the mega menu, the shelves, search, counts, brand pages, the
sitemap. Perfume and makeup stay. This pins the set and its shape; the SQL rule
(`catalog_queries.shown_category`) is exercised by the route tests against SQLite.
"""

from app.services import taxonomy


class TestHiddenCategories:
    def test_the_two_out_of_scope_categories_are_hidden_and_the_beauty_pair_is_not(self):
        assert taxonomy.HIDDEN_CATEGORIES == {"Skincare", "Confectionery"}
        assert taxonomy.is_shown("Perfume") and taxonomy.is_shown("Makeup")
        assert not taxonomy.is_shown("Skincare") and not taxonomy.is_shown("Confectionery")

    def test_every_hidden_category_is_a_real_category(self):
        """A typo here would hide nothing and nobody would notice."""
        assert taxonomy.HIDDEN_CATEGORIES <= set(taxonomy.VERTICAL_OF_CATEGORY)

    def test_uncategorised_products_are_shown(self):
        assert taxonomy.is_shown(None) and taxonomy.is_shown("")
