Commit 8846bfa2 authored by Jérome Perrin's avatar Jérome Perrin

ui_test_core: address pylint warnings and enable coding style test

parent 182f833d
# pylint:disable=redefined-builtin
# select_language is a builtin because of a Localizer.itools.i18n.accept patch
context.Base_doLanguage(select_language)
# Don't redirect. Base_doLanguage tries to redirect to the same page
# and then selenium main page is loaded again in the bottom frame of
......
......@@ -7,7 +7,13 @@ if REQUEST:
assert context.getPortalType() == "Test Tool", "bad context"
if test_id is None or test_id == '':
test_id = ''.join(list(filter(lambda a: a not in ["'",'_', '-','.',' ','~', ':', '/', '?', '#', '[', ']', '@', '!', '$', '&', '(', ')', '*','+',';','='], title)))
test_id = ''.join(
list(
filter( # pylint:disable=deprecated-lambda
lambda a: a not in [
"'", '_', '-', '.', ' ', '~', ':', '/', '?', '#', '[', ']', '@', '!',
'$', '&', '(', ')', '*', '+', ';', '='
], title)))
if test_id not in context.objectIds():
factory = context.manage_addProduct['PageTemplates']
......
......@@ -6,13 +6,13 @@ test_list = []
count = 0
portal = context.getPortalObject()
for url in url_list:
count += 1
if "http" not in url:
# local content
data = portal.restrictedTraverse(url).TestPage_viewSeleniumTest()
else:
data = context.Zuite_urlRead(url, safe_return=1)
test_list.append((data, '%s %s' % (count, url)),)
count += 1
if "http" not in url:
# local content
data = portal.restrictedTraverse(url).TestPage_viewSeleniumTest()
else:
data = context.Zuite_urlRead(url, safe_return=1)
test_list.append((data, '%s %s' % (count, url)),)
return context.Zuite_createAndLaunchSeleniumTest(test_list=test_list,
zuite_id=zuite_id)
"""
Upload a screenshot taken by the test to ERP5
"""
from erp5.component.module.Log import log
data_uri = context.REQUEST.form.get('data_uri', 'default')
image_module = getattr(context, "image_module", None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment