22 lines
906 B
Python
22 lines
906 B
Python
from urllib.parse import urlparse
|
|
|
|
|
|
def test_illawarra_manifest_contains_fifty_unique_https_sources(source_manifest):
|
|
assert len(source_manifest) == 50
|
|
urls = [item["url"] for item in source_manifest]
|
|
assert len(set(urls)) == 50
|
|
assert all(urlparse(url).scheme == "https" for url in urls)
|
|
|
|
|
|
def test_updated_collegians_urls_are_present(source_manifest):
|
|
urls = {item["url"] for item in source_manifest}
|
|
assert "https://collegians.com.au/entertainment/" in urls
|
|
assert "https://collegians.com.au/balgownie-entertainment/" in urls
|
|
assert "https://www.collegians.com.au/whats-on/wollongong/" not in urls
|
|
assert "https://www.collegians.com.au/whats-on/balgownie/" not in urls
|
|
|
|
|
|
def test_manifest_has_expected_mode_diversity(source_manifest):
|
|
modes = {item["mode"] for item in source_manifest}
|
|
assert {"html", "dynamic", "recurring", "mixed", "image-heavy"} <= modes
|