mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-04 07:02:26 -05:00
Update pp_tests.py
This commit is contained in:
parent
b7381b3d0a
commit
81ddee4760
@ -41,46 +41,6 @@ class PPInitTests(unittest.TestCase):
|
||||
def test_init_folder_name(self):
|
||||
self.assertEqual(self.pp.folder_name, test.SHOWNAME)
|
||||
|
||||
|
||||
class PPPrivateTests(test.SickbeardTestDBCase):
|
||||
|
||||
|
||||
def setUp(self):
|
||||
super(PPPrivateTests, self).setUp()
|
||||
|
||||
sickbeard.showList = [TVShow(1,0000), TVShow(1,0001)]
|
||||
|
||||
self.pp = PostProcessor(test.FILEPATH)
|
||||
self.show_obj = TVShow(1,0002)
|
||||
|
||||
self.db = test.db.DBConnection()
|
||||
newValueDict = {"indexerid": 1002,
|
||||
"name": test.SHOWNAME,
|
||||
"description": "description",
|
||||
"airdate": 1234,
|
||||
"hasnfo": 1,
|
||||
"hastbn": 1,
|
||||
"status": 404,
|
||||
"location": test.FILEPATH}
|
||||
controlValueDict = {"showid": 0002,
|
||||
"season": test.SEASON,
|
||||
"episode": test.EPISODE}
|
||||
|
||||
# use a custom update/insert method to get the data into the DB
|
||||
self.db.upsert("tv_episodes", newValueDict, controlValueDict)
|
||||
|
||||
self.ep_obj = TVEpisode(self.show_obj, test.SEASON, test.EPISODE, test.FILEPATH)
|
||||
print
|
||||
|
||||
def test__find_ep_destination_folder(self):
|
||||
self.show_obj.location = test.FILEDIR
|
||||
self.ep_obj.show.seasonfolders = 1
|
||||
sickbeard.SEASON_FOLDERS_FORMAT = 'Season %02d'
|
||||
calculatedPath = self.ep_obj.proper_path()
|
||||
expectedPath = os.path.join(test.FILEDIR, "Season 0" + str(test.SEASON))
|
||||
self.assertEqual(calculatedPath, expectedPath)
|
||||
|
||||
|
||||
class PPBasicTests(test.SickbeardTestDBCase):
|
||||
|
||||
def test_process(self):
|
||||
@ -109,8 +69,5 @@ if __name__ == '__main__':
|
||||
suite = unittest.TestLoader().loadTestsFromTestCase(PPInitTests)
|
||||
unittest.TextTestRunner(verbosity=2).run(suite)
|
||||
print "######################################################################"
|
||||
suite = unittest.TestLoader().loadTestsFromTestCase(PPPrivateTests)
|
||||
unittest.TextTestRunner(verbosity=2).run(suite)
|
||||
print "######################################################################"
|
||||
suite = unittest.TestLoader().loadTestsFromTestCase(PPBasicTests)
|
||||
unittest.TextTestRunner(verbosity=2).run(suite)
|
||||
|
Loading…
Reference in New Issue
Block a user