From f4ea244dc94dae11236d3fddf7611c2637e18f36 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 30 Oct 2014 22:40:07 +0800 Subject: [PATCH] Fixes some unittests --- tests/scene_helpers_tests.py | 8 ++++---- tests/tv_tests.py | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/scene_helpers_tests.py b/tests/scene_helpers_tests.py index e9abd7fb..a851fc91 100644 --- a/tests/scene_helpers_tests.py +++ b/tests/scene_helpers_tests.py @@ -22,8 +22,8 @@ class SceneTests(test.SickbeardTestDBCase): dot_expected = [x.replace(' ', '.') for x in expected] self.assertTrue(len(set(dot_expected).intersection(set(dot_result))) == len(dot_expected)) - def _test_allPossibleShowNames(self, name, tvdbid=0, expected=[]): - s = Show(tvdbid) + def _test_allPossibleShowNames(self, name, indexerid=0, expected=[]): + s = Show(1, indexerid) s.name = name result = show_name_helpers.allPossibleShowNames(s) @@ -48,7 +48,7 @@ class SceneTests(test.SickbeardTestDBCase): for testCase in listOfcases: scene_name, show_name = testCase - s = Show(0) + s = Show(1, 0) s.name = show_name self._test_isGoodName(scene_name, s) @@ -69,7 +69,7 @@ class SceneTests(test.SickbeardTestDBCase): def test_allPossibleShowNames(self): #common.sceneExceptions[-1] = ['Exception Test'] myDB = db.DBConnection("cache.db") - myDB.action("INSERT INTO scene_exceptions (indexer_id, show_name) VALUES (?,?)", [-1, 'Exception Test']) + myDB.action("INSERT INTO scene_exceptions (indexer_id, show_name, season) VALUES (?,?,?)", [-1, 'Exception Test', -1]) common.countryList['Full Country Name'] = 'FCN' self._test_allPossibleShowNames('Show Name', expected=['Show Name']) diff --git a/tests/tv_tests.py b/tests/tv_tests.py index 36894b5c..9ef4427c 100644 --- a/tests/tv_tests.py +++ b/tests/tv_tests.py @@ -29,11 +29,11 @@ class TVShowTests(test.SickbeardTestDBCase): super(TVShowTests, self).setUp() sickbeard.showList = [] - def test_init_tvdbid(self): + def test_init_indexerid(self): show = TVShow(1, 0001, "en") - self.assertEqual(show.tvdbid, 0001) + self.assertEqual(show.indexerid, 0001) - def test_change_tvdbid(self): + def test_change_indexerid(self): show = TVShow(1, 0001, "en") show.name = "show name" show.tvrname = "show name" @@ -47,11 +47,11 @@ class TVShowTests(test.SickbeardTestDBCase): show.saveToDB() show.loadFromDB(skipNFO=True) - show.tvdbid = 0002 + show.indexerid = 0002 show.saveToDB() show.loadFromDB(skipNFO=True) - self.assertEqual(show.tvdbid, 0002) + self.assertEqual(show.indexerid, 0002) def test_set_name(self): show = TVShow(1, 0001, "en")