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