def test_feed_extraction(self): """Test that feeds are matched properly """ url = 'http://theatlantic.com' html = mock_resource_with('theatlantic.com1', 'html') s = Source(url, memoize_articles=False) s.html = html s.parse() # mock in categories containing only homepage #s.set_categories() category = Category(url=url) category.html = html category.doc = s.doc s.categories = [ category, ] #s.parse_categories() s.set_feeds() self.assertEqual(len(s.feeds), 3)