import pytest from apps.blog.models import ArticleIndexPage, ArticlePage from apps.blog.tests.factories import AuthorFactory @pytest.mark.django_db def test_article_page_renders_core_seo_meta(client, home_page): index = ArticleIndexPage(title="Articles", slug="articles") home_page.add_child(instance=index) author = AuthorFactory() article = ArticlePage( title="SEO Article", slug="seo-article", author=author, summary="Summary content", body=[("rich_text", "
Body
")], ) index.add_child(instance=article) article.save_revision().publish() resp = client.get("/articles/seo-article/") html = resp.content.decode() assert resp.status_code == 200 assert '