New English meme and flyer set, retire Dutch-text gallery images
This commit is contained in:
@@ -5,3 +5,22 @@ def test_galleries_have_images(anon):
|
||||
for path, minimum in (("/flyers", 4), ("/memes", 10)):
|
||||
html = anon.get(path).text
|
||||
assert html.count("data-lightbox") >= minimum, path
|
||||
|
||||
|
||||
def test_retired_dutch_images_are_not_listed(anon):
|
||||
from molodetz.gallery import RETIRED_GALLERY
|
||||
|
||||
for path in ("/flyers", "/memes"):
|
||||
items = anon.get(path, headers={"Accept": "application/json"}).json()["items"]
|
||||
names = {item["filename"] for item in items}
|
||||
assert not names & set(RETIRED_GALLERY), path
|
||||
assert all(item["caption"] for item in items), path
|
||||
|
||||
|
||||
def test_home_features_the_elite_twice_flyer(anon):
|
||||
html = anon.get("/").text
|
||||
assert "flyer-elite-twice.jpg" in html
|
||||
assert "Elite twice." in html
|
||||
counts = anon.get("/", headers={"Accept": "application/json"}).json()
|
||||
assert counts["flyer_count"] == 4
|
||||
assert counts["meme_count"] >= 18
|
||||
|
||||
@@ -43,7 +43,7 @@ def test_sitemap_lists_english_paths(anon):
|
||||
def test_gallery_captions_are_english(anon):
|
||||
flyers = anon.get("/flyers", headers={"Accept": "application/json"}).json()["items"]
|
||||
captions = {item["caption"] for item in flyers}
|
||||
assert "Thirty-one choices. You have zero." in captions
|
||||
assert "Taste does not autocomplete." in captions
|
||||
assert not any(" geen " in f" {caption.lower()} " or " een " in f" {caption.lower()} " for caption in captions)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user