1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-25 01:08:50 -05:00
SickRage/tests/feedparser_tests.py
echel0n 0da960ff51 Fixed issues with newznab custom provider categories.
Updated feedparser and added custom code to parse subcategories.
Updated jQuery and Bootstrap.
2014-12-24 07:49:15 -08:00

28 lines
962 B
Python

import unittest
import sys
import os.path
import test_lib as test
sys.path.append(os.path.abspath('..'))
sys.path.append(os.path.abspath('../lib'))
from sickbeard.rssfeeds import RSSFeeds
class FeedParserTests(unittest.TestCase):
def test_newznab(self):
RSSFeeds().clearCache()
result = RSSFeeds().getFeed('http://lolo.sickbeard.com/api?t=caps')
self.assertTrue('entries' in result)
self.assertTrue('feed' in result)
self.assertTrue('categories' in result.feed)
if __name__ == "__main__":
print "=================="
print "STARTING - FEEDPARSER TESTS"
print "=================="
print "######################################################################"
suite = unittest.TestLoader().loadTestsFromTestCase(FeedParserTests)
testresults = unittest.TextTestRunner(verbosity=2).run(suite)
# Return 0 if successful, 1 if there was a failure
sys.exit(not testresults.wasSuccessful())