示例#1
0
 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')
示例#2
0
 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")
示例#3
0
 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")
示例#4
0
 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')
示例#5
0
 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')
示例#6
0
 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")
示例#7
0
 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")
示例#8
0
    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)
示例#9
0
文件: pp_tests.py 项目: v0re/SickGear
    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
示例#10
0
    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)
示例#11
0
    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())
示例#12
0
    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())
示例#13
0
    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())
示例#14
0
    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())
示例#15
0
    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)
示例#16
0
    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)
示例#17
0
    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())
示例#18
0
文件: pp_tests.py 项目: v0re/SickGear
    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())
示例#19
0
    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())
示例#20
0
    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())