migliorie test
This commit is contained in:
@@ -22,7 +22,7 @@ from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
def findhost():
|
||||
data = support.httptools.downloadpage('https://altadefinizione-nuovo.info/').data
|
||||
data = support.httptools.downloadpage('https://altadefinizione-nuovo.me/').data
|
||||
host = support.scrapertools.find_single_match(data, '<div class="elementor-button-wrapper"> <a href="([^"]+)"')
|
||||
return host
|
||||
|
||||
@@ -30,7 +30,6 @@ host = config.get_channel_url(findhost)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
film = ['',
|
||||
|
||||
@@ -45,7 +45,7 @@ def encode_log(message=""):
|
||||
message = str(message)
|
||||
|
||||
if testMode:
|
||||
message = cgi.escape(message)
|
||||
message = cgi.escape(message).replace('\n', '<br>')
|
||||
|
||||
return message
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ chNumRis = {
|
||||
servers = []
|
||||
channels = []
|
||||
|
||||
channel_list = channelselector.filterchannels("all")[:4] if 'KOD_TST_CH' not in os.environ else [Item(channel=os.environ['KOD_TST_CH'], action="mainlist")]
|
||||
channel_list = channelselector.filterchannels("all") if 'KOD_TST_CH' not in os.environ else [Item(channel=os.environ['KOD_TST_CH'], action="mainlist")]
|
||||
ret = []
|
||||
for chItem in channel_list:
|
||||
try:
|
||||
@@ -208,6 +208,7 @@ class GenericChannelTest(unittest.TestCase):
|
||||
class GenericChannelMenuItemTest(unittest.TestCase):
|
||||
def test_menu(self):
|
||||
print 'testing ' + self.ch + ' --> ' + self.title
|
||||
self.assertTrue(self.module.host, 'channel ' + self.ch + ' has not a valid hostname')
|
||||
self.assertTrue(self.itemlist, 'channel ' + self.ch + ' -> ' + self.title + ' is empty')
|
||||
self.assertTrue(self.serversFound,
|
||||
'channel ' + self.ch + ' -> ' + self.title + ' has no servers on all results')
|
||||
|
||||
Reference in New Issue
Block a user