Files
ad/tests/api/posts.py
T

10 lines
349 B
Python

# retoor <retoor@molodetz.nl>
def test_post_page(anon):
posts = anon.get("/rol", headers={"Accept": "application/json"}).json()["posts"]
post = next(post for post in posts if post["title"] == "Geen cursus.")
response = anon.get(f"/posts/{post['slug']}")
assert response.status_code == 200
assert "Placeholder" in response.text