1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-08-13 16:53:54 -04:00
SickRage/sickbeard/indexers/test/test.py
echel0n ce193ffcdb Replaced our cache handler 'CacheControl' with 'httpcache' as we found the previous was not stable enough and was causing more issues then good.
Added cache handler to sickbeard it self so now everything should be running faster for searches and rss feeds.
2014-03-16 04:06:21 -07:00

35 lines
886 B
Python

from __future__ import with_statement
import unittest
import sys
import os.path
sys.path.append(os.path.abspath('..'))
sys.path.append(os.path.abspath('../../../lib'))
from sickbeard.indexers.indexer_api import indexerApi
from sickbeard.indexers.indexer_exceptions import indexer_exception
class APICheck(unittest.TestCase):
indexer_id = 81189
indexer = 'Tvdb'
lang = "en"
# Set our common indexer_api options here
INDEXER_API_PARMS = {'indexer': indexer}
lindexer_api_parms = INDEXER_API_PARMS.copy()
try:
lang_id = indexerApi().config['langabbv_to_id'][lang]
t = indexerApi(cache=True, **lindexer_api_parms)
myEp = t[indexer_id]
if getattr(myEp, 'seriesname', None) is not None:
print "FOUND"
except indexer_exception as e:
print e
pass
if __name__ == "__main__":
unittest.main()