Add Docker-executed pytest suite with >90% coverage
This commit is contained in:
18
apps/blog/tests/test_feeds_more.py
Normal file
18
apps/blog/tests/test_feeds_more.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import pytest
|
||||
|
||||
from apps.blog.feeds import AllArticlesFeed
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_all_feed_methods(article_page):
|
||||
feed = AllArticlesFeed()
|
||||
assert feed.item_title(article_page) == article_page.title
|
||||
assert article_page.summary in feed.item_description(article_page)
|
||||
assert article_page.author.name == feed.item_author_name(article_page)
|
||||
assert feed.item_link(article_page).startswith("http")
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_tag_feed_not_found(client):
|
||||
resp = client.get("/feed/tag/does-not-exist/")
|
||||
assert resp.status_code == 404
|
||||
Reference in New Issue
Block a user