Example #1
0
 def test_rss_feed_non_200(self):
     url = 'http://example1.%s.com' % utils.random_string()
     manager = RSSManager(logging, None, None)
     httpretty.register_uri(httpretty.GET, url, body=history_on_fire.DATA, status=400)
     with self.assertRaises(HathorException) as error:
         manager.broadcast_update(url)
     self.check_error_message('Getting invalid status code:400 for rss feed', error)
Example #2
0
 def test_rss_feed(self):
     url = 'http://example.%s.com' % utils.random_string()
     manager = RSSManager(logging, None, None)
     httpretty.register_uri(httpretty.GET, url, body=history_on_fire.DATA)
     episodes = manager.broadcast_update(url)
     self.assert_length(episodes, 12)
     for ep in episodes:
         self.assert_dictionary(ep)