migliorie test

This commit is contained in:
marco
2020-07-31 22:22:21 +02:00
parent 20d099fcb9
commit 12bdf02770
3 changed files with 4 additions and 4 deletions

View File

@@ -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 = ['',

View File

@@ -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

View File

@@ -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')