def setUp(self): sickbeard.showList = [] setup_test_db() setup_test_episode_file() setup_test_show_dir() setup_test_processing_dir() show = TVShow(1, 1, 'en') show.name = SHOW_NAME show.location = FILE_DIR show.episodes = {} for season in range(1, NUM_SEASONS): show.episodes[season] = {} for episode in range(1, EPISODES_PER_SEASON): if season == SEASON and episode == EPISODE: episode = TVEpisode(show, season, episode, ep_file=FILE_PATH) else: episode = TVEpisode(show, season, episode) show.episodes[season][episode] = episode episode.saveToDB() show.saveToDB() sickbeard.showList = [show]
def _create_ep(tvid): show_obj = TVShow(tvid, 3) show_obj.name = test.SHOWNAME show_obj.location = test.SHOWDIR show_obj.save_to_db() sickbeard.showList = [show_obj] ep_obj = TVEpisode(show_obj, test.SEASON, test.EPISODE) ep_obj.name = 'some ep name' ep_obj.location = '/mnt/hdd/folder/the show/season 01/the show - s01e01 - name.mkv' ep_obj.save_to_db() return ep_obj
def test_process(self): show = TVShow(3) show.name = test.SHOWNAME show.location = test.SHOWDIR show.saveToDB() sickbeard.showList = [show] ep = TVEpisode(show, test.SEASON, test.EPISODE) ep.name = "some ep name" ep.saveToDB() pp = PostProcessor(test.FILEPATH) self.assertTrue(pp.process())
def test_process(self): show = TVShow(1, 3) show.name = test.SHOWNAME show.location = test.SHOWDIR show.saveToDB() sickbeard.showList = [show] ep = TVEpisode(show, test.SEASON, test.EPISODE) ep.name = "some ep name" ep.saveToDB() pp = PostProcessor(test.FILEPATH) self.assertTrue(pp.process())
def test_process(self): show = TVShow(1, 3) show.name = test.SHOWNAME show.location = test.SHOWDIR show.saveToDB() sickbeard.showList = [show] ep = TVEpisode(show, test.SEASON, test.EPISODE) ep.name = "some ep name" ep.saveToDB() addNameToCache('show name', 3) self.pp = PostProcessor(test.FILEPATH, process_method='move') self.assertTrue(self.pp.process())
def test_process(self): show = TVShow(1, 3) show.name = SHOWNAME show.location = SHOWDIR show.saveToDB() sickbeard.showList = [show] ep = TVEpisode(show, SEASON, EPISODE) ep.name = "some ep name" ep.saveToDB() addNameToCache('show name', 3) self.pp = PostProcessor(FILEPATH, process_method='move') self.assertTrue(self.pp.process())
def test_process(self): show = TVShow(1,3) show.name = test.SHOWNAME show.location = test.SHOWDIR show.saveToDB() sickbeard.showList = [show] ep = TVEpisode(show, test.SEASON, test.EPISODE) ep.name = "some ep name" ep.saveToDB() addNameToCache('show name', 3) sickbeard.PROCESS_METHOD = 'move' pp = PostProcessor(test.FILEPATH) self.assertTrue(pp.process())
def test_process(self): show_obj = TVShow(1, 3) show_obj.tvid = TVINFO_TVDB show_obj.name = test.SHOWNAME show_obj.location = test.SHOWDIR show_obj.save_to_db() sickbeard.showList = [show_obj] ep_obj = TVEpisode(show_obj, test.SEASON, test.EPISODE) ep_obj.name = 'some ep name' ep_obj.release_name = 'test setter' ep_obj.save_to_db() addNameToCache('show name', tvid=TVINFO_TVDB, prodid=3) sickbeard.PROCESS_METHOD = 'move' pp = PostProcessor(test.FILEPATH) self.assertTrue(pp.process())
def test_process(self): """ Test process """ show = TVShow(1, 3) show.name = test.SHOW_NAME show.location = test.SHOW_DIR show.saveToDB() sickbeard.showList = [show] episode = TVEpisode(show, test.SEASON, test.EPISODE) episode.name = "some episode name" episode.saveToDB() addNameToCache('show name', 3) sickbeard.PROCESS_METHOD = 'move' post_processor = PostProcessor(test.FILE_PATH) self.assertTrue(post_processor.process())
def setUp(self): sickbeard.showList = [] setup_test_db() setup_test_episode_file() setup_test_show_dir() setup_test_processing_dir() show = TVShow(1, 0001, 'en') show.name = SHOW_NAME show.location = FILE_DIR show.episodes = {} for season in range(1, NUM_SEASONS): show.episodes[season] = {} for episode in range(1, EPISODES_PER_SEASON): if season == SEASON and episode == EPISODE: episode = TVEpisode(show, season, episode, ep_file=FILE_PATH) else: episode = TVEpisode(show, season, episode) show.episodes[season][episode] = episode episode.saveToDB() show.saveToDB() sickbeard.showList = [show]
def test(self): self.showDir = test_lib.setUp_test_show_dir(show_name) self.filePath = test_lib.setUp_test_episode_file( None, curData["b"] + ".mkv") show = TVShow(tvdbdid) show.name = show_name show.quality = curData["q"] show.location = self.showDir if curData["anime"]: show.anime = 1 show.saveToDB() sickbeard.showList.append(show) for epNumber in curData["e"]: episode = TVEpisode(show, curData["s"], epNumber) episode.status = c.WANTED if "ab" in curData: episode.absolute_number = curData["ab"] episode.saveToDB() pp = PostProcessor(self.filePath) self.assertTrue(pp.process())