def test_is_country_tag(): assert is_country_tag('ru') is True assert is_country_tag('FR') is True assert is_country_tag('a1') is False assert is_country_tag('dating') is False assert is_country_tag('global') is True
def test_tags_validity(default_db): unknown_tags = set() for site in default_db.sites: for tag in filter(lambda x: not is_country_tag(x), site.tags): if tag not in SUPPORTED_TAGS: unknown_tags.add(tag) assert unknown_tags == set()