fix tests
This commit is contained in:
@@ -144,7 +144,7 @@ class GenericChannelTest(unittest.TestCase):
|
|||||||
self.assertTrue(mainlist, 'channel ' + self.ch + ' has no menu')
|
self.assertTrue(mainlist, 'channel ' + self.ch + ' has no menu')
|
||||||
|
|
||||||
for it in mainlist:
|
for it in mainlist:
|
||||||
it.title = it.title.encode('ascii', 'ignore')
|
it.title = it.title.decode('ascii', 'ignore')
|
||||||
if it.action == 'channel_config':
|
if it.action == 'channel_config':
|
||||||
hasChannelConfig = True
|
hasChannelConfig = True
|
||||||
continue
|
continue
|
||||||
@@ -156,10 +156,8 @@ class GenericChannelTest(unittest.TestCase):
|
|||||||
for content in chNumRis[self.ch]:
|
for content in chNumRis[self.ch]:
|
||||||
if content in it.title:
|
if content in it.title:
|
||||||
risNum = len(itemlist) - 1 # - nextpage
|
risNum = len(itemlist) - 1 # - nextpage
|
||||||
self.assertEqual(risNum, chNumRis[self.ch][content],
|
self.assertEqual(chNumRis[self.ch][content], risNum,
|
||||||
'channel ' + self.ch + ' -> ' + it.title + ' returned ' + str(
|
'channel ' + self.ch + ' -> ' + it.title + ' returned wrong number of results')
|
||||||
risNum) + ' results but should have returned ' + str(
|
|
||||||
chNumRis[self.ch][content]))
|
|
||||||
break
|
break
|
||||||
|
|
||||||
for resIt in itemlist:
|
for resIt in itemlist:
|
||||||
|
|||||||
Reference in New Issue
Block a user