コード例 #1
0
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)
コード例 #2
0
 def test_assert_language_code(self):
     assert_language_code(language_code="de")
     assert_language_code(language_code="en")
コード例 #3
0
 def test_assert_language_code(self):
     assert_language_code(language_code="de")
     assert_language_code(language_code="en")