示例#1
0
 def test_feed_with_site_image(self):
     """
     this should figure out the best site image
     and import it to the feed's `image` attribute
     """
     # known good feed
     url = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data/test_feeds/feed_with_image_wp.rss")
     feed = tasks.url_to_feed(url)
     self.assertTrue(isinstance(feed.image, CachedImage))
     
示例#2
0
 def test_unreliable_feeds(self):
     for url in self.test_feeds:
         print url
         feed = tasks.url_to_feed(url)
         if feed:
             tasks.update_items(feed)
示例#3
0
 def test_add_new_feed_wp(self):
     res = tasks.url_to_feed(self.feed_url_wp)
     self.assertTrue(isinstance(res, Feed))
示例#4
0
 def test_add_new_items_yb(self):
     feed = tasks.url_to_feed(self.feed_url_yb)
     tasks.update_items(feed)
示例#5
0
 def test_fetch_feed_invalid(self):
     res = tasks.url_to_feed(self.feed_url_invalid)
     self.assertFalse(isinstance(res, Feed))