def test_init_empty_db(self): show = TVShow(1, 1, 'en') ep = TVEpisode(show, 1, 1) ep.name = 'asdasdasdajkaj' ep.saveToDB() ep.loadFromDB(1, 1) self.assertEqual(ep.name, 'asdasdasdajkaj')
def test_init_empty_db(self): show = TVShow(1, 1, "en") ep = TVEpisode(show, 1, 1) ep.name = "asdasdasdajkaj" ep.saveToDB() ep.loadFromDB(1, 1) self.assertEqual(ep.name, "asdasdasdajkaj")
def test_init_empty_db(self): show = TVShow(1, 0001, "en") ep = TVEpisode(show, 1, 1) ep.name = "asdasdasdajkaj" ep.saveToDB() ep.loadFromDB(1, 1) self.assertEqual(ep.name, "asdasdasdajkaj")
def test_init_empty_db(self): show_obj = TVShow(1, 1, 'en') ep_obj = TVEpisode(show_obj, 1, 1) ep_obj.name = 'asdasdasdajkaj' ep_obj.save_to_db() ep_obj.load_from_db(1, 1) self.assertEqual(ep_obj.name, 'asdasdasdajkaj')
def test_init_empty_db(self): """ test init empty db """ show = TVShow(1, 1, "en") episode = TVEpisode(show, 1, 1) episode.name = "asdasdasdajkaj" episode.saveToDB() episode.loadFromDB(1, 1) self.assertEqual(episode.name, "asdasdasdajkaj")
def setUpClass(cls): cls.shows = [] show = TVShow(1, 121361) show.name = "Italian Works" show.episodes = [] episode = TVEpisode(show, 05, 10) episode.name = "Pines of Rome" episode.scene_season = 5 episode.scene_episode = 10 show.episodes.append(episode) cls.shows.append(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 setUpClass(cls): cls.shows = [] show = TVShow(1, 121361) show.name = "Italian Works" show.episodes = [] episode = TVEpisode(show, 5, 10) episode.name = "Pines of Rome" episode.scene_season = 5 episode.scene_episode = 10 show.episodes.append(episode) cls.shows.append(show)
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 setUpClass(cls): num_legacy_shows = 3 num_shows = 3 num_episodes_per_show = 5 cls.mydb = db.DBConnection() cls.legacy_shows = [] cls.shows = [] # Per-show-notifications were originally added for email notifications only. To add # this feature to other notifiers, it was necessary to alter the way text is stored in # one of the DB columns. Therefore, to test properly, we must create some shows that # store emails in the old method (legacy method) and then other shows that will use # the new method. for show_counter in range(100, 100 + num_legacy_shows): show = TVShow(1, show_counter) show.name = "Show " + str(show_counter) show.episodes = [] for episode_counter in range(0, num_episodes_per_show): episode = TVEpisode(show, test.SEASON, episode_counter) episode.name = "Episode " + str(episode_counter + 1) episode.quality = "SDTV" show.episodes.append(episode) show.saveToDB() cls.legacy_shows.append(show) for show_counter in range(200, 200 + num_shows): show = TVShow(1, show_counter) show.name = "Show " + str(show_counter) show.episodes = [] for episode_counter in range(0, num_episodes_per_show): episode = TVEpisode(show, test.SEASON, episode_counter) episode.name = "Episode " + str(episode_counter + 1) episode.quality = "SDTV" show.episodes.append(episode) show.saveToDB() cls.shows.append(show)
def setUpClass(cls): num_legacy_shows = 3 num_shows = 3 num_episodes_per_show = 5 cls.mydb = db.DBConnection() cls.legacy_shows = [] cls.shows = [] # Per-show-notifications were originally added for email notifications only. To add # this feature to other notifiers, it was necessary to alter the way text is stored in # one of the DB columns. Therefore, to test properly, we must create some shows that # store emails in the old method (legacy method) and then other shows that will use # the new method. for show_counter in range(100, 100+num_legacy_shows): show = TVShow(1, show_counter) show.name = "Show "+str(show_counter) show.episodes = [] for episode_counter in range(0, num_episodes_per_show): episode = TVEpisode(show, test.SEASON, episode_counter) episode.name = "Episode "+str(episode_counter+1) episode.quality = "SDTV" show.episodes.append(episode) show.saveToDB() cls.legacy_shows.append(show) for show_counter in range(200, 200+num_shows): show = TVShow(1, show_counter) show.name = "Show "+str(show_counter) show.episodes = [] for episode_counter in range(0, num_episodes_per_show): episode = TVEpisode(show, test.SEASON, episode_counter) episode.name = "Episode "+str(episode_counter+1) episode.quality = "SDTV" show.episodes.append(episode) show.saveToDB() cls.shows.append(show)
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())