def assert_public_cms_page_urls(*, language_code, urls): """ Check if given urls exist. """ assert_language_code(language_code=language_code) assert isinstance(urls, (list, tuple)) existing_urls = get_public_cms_page_urls(language_code=language_code) for url in urls: assert url in existing_urls, "%r not in %r" % (url, existing_urls)
def test_assert_language_code(self): assert_language_code(language_code="de") assert_language_code(language_code="en")