Esempio n. 1
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())
Esempio n. 2
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())
Esempio n. 3
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())
Esempio n. 4
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())
Esempio n. 5
0
    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())
Esempio n. 6
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())
Esempio n. 7
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())
Esempio n. 8
0
class PPBasicTests(test.SiCKRAGETestDBCase):
    def setUp(self):
        super(PPBasicTests, self).setUp()

    def tearDown(self):
        super(PPBasicTests, self).tearDown()

    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())
Esempio n. 9
0
class PPBasicTests(SiCKRAGETestDBCase):
    def setUp(self, **kwargs):
        super(PPBasicTests, self).setUp()

    def tearDown(self, **kwargs):
        super(PPBasicTests, self).tearDown()

    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())
Esempio n. 10
0
    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())