Commits

Jason R. Coombs committed 072df56

Added test to capture buggy entry formatting

  • Participants
  • Parent commits b2b9c83

Comments (0)

Files changed (1)

File tests/unit/test_rss.py

+import urlparse
+
 import pytest
+import feedparser
 
 import pmxbot.rss
 
 		new_history = pmxbot.rss.FeedHistory(orig_uri)
 		assert len(new_history) == 1
 		assert new_history.add_seen_feed(entry, 'http://example.com') is False
+
+@pytest.has_internet
+def test_format_entry():
+	bitbucket = 'https://bitbucket.org'
+	feed_url=urlparse.urljoin(bitbucket, '/yougov/pmxbot/rss')
+	res = feedparser.parse(feed_url)
+	entry = res['entries'][0]
+	pmxbot.rss.RSSFeeds.format_entry(entry)