16 lines
527 B
Python
16 lines
527 B
Python
# retoor <retoor@molodetz.nl>
|
|||
|
|
|
||
|
|
|
||
|
|
def test_home_is_molodetz(anon):
|
||
|
|
html = anon.get("/").text
|
||
|
|
assert "Molodetz" in html
|
||
|
|
for label in ("Rol", "Standaard", "Flyers", "Memes", "Mensen", "Binnen"):
|
||
|
|
assert f">{label}</a>" in html
|
||
|
|
assert "wa.me" not in html and "whatsapp" not in html.lower()
|
||
|
|
|
||
|
|
|
||
|
|
def test_unknown_page_is_404(anon):
|
||
|
|
response = anon.get("/bestaat-niet-xyz")
|
||
|
|
assert response.status_code == 404
|
||
|
|
assert anon.get("/bestaat-niet-xyz", headers={"Accept": "application/json"}).json()["error"]
|