def _create_moviedaos(): yb_parser = YBParser(app.config['YOURBIT_MOVIES_URL']) feed = yb_parser.parse_feed() torrents_titles = yb_parser.get_torrents_titles(feed) movie_titles = yb_parser.get_movies_titles(torrents_titles) moviedaos = [MovieDAO(title) for title in movie_titles] return moviedaos
def test_ybparser_parse_feed_returns_empty_feed_for_not_responding_feedurl(): yb_parser = YBParser("http://shoud.not.responding.com.pl") feed = yb_parser.parse_feed() assert not feed['entries']