Skip to content

Commit

Permalink
Minor clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Guts committed Mar 29, 2022
1 parent b010121 commit 418df4a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion tests/fixtures/docs/page_with_meta.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
---
Title: Use the MkDocs RSS Plugin
title: Use the MkDocs RSS Plugin
authors:
- Guts
- Tim Vink
- liang2kl
date: 2020-03-20 10:20
description: First test page of mkdocs-rss-plugin test suite
tags:
Expand Down
6 changes: 4 additions & 2 deletions tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_simple_build_minimal(self):
# created items
feed_parsed = feedparser.parse(Path(tmpdirname) / "feed_rss_created.xml")
for feed_item in feed_parsed.entries:
print(feed_item.keys())

# mandatory properties
self.assertTrue("description" in feed_item)
self.assertTrue("guid" in feed_item)
Expand All @@ -104,11 +104,13 @@ def test_simple_build_minimal(self):
self.assertTrue("source" in feed_item)
self.assertTrue("title" in feed_item)
# optional - following should not be present in the feed by default
self.assertTrue("author" not in feed_item)
self.assertTrue("category" not in feed_item)
self.assertTrue("comments" not in feed_item)
self.assertTrue("enclosure" not in feed_item)

if feed_item.title in ("Test page with meta",):
self.assertTrue("author" in feed_item)

def test_simple_build_disabled(self):
with tempfile.TemporaryDirectory() as tmpdirname:
cli_result = self.build_docs_setup(
Expand Down

0 comments on commit 418df4a

Please sign in to comment.