summaryrefslogtreecommitdiffstats
path: root/utils/test/reporting/functest
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-04-26 16:16:44 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2016-04-26 16:16:44 +0200
commitade767845f031934fd2150efb53e6a976ca4e1de (patch)
tree212b41313ba09fc89533edf3ab3d75bfcec0e9d6 /utils/test/reporting/functest
parent42c0c75a9e3564758aaaccadec9e1bad42b283eb (diff)
Improve code quality (flake8)
Change-Id: Id58236ab080bc7dd5d9d7b98c4a0fce27ee1b7ad Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'utils/test/reporting/functest')
-rw-r--r--utils/test/reporting/functest/reporting-status.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/utils/test/reporting/functest/reporting-status.py b/utils/test/reporting/functest/reporting-status.py
index 9e6aeb1ad..2eb0f50d5 100644
--- a/utils/test/reporting/functest/reporting-status.py
+++ b/utils/test/reporting/functest/reporting-status.py
@@ -111,9 +111,9 @@ def getApiResults(case, installer, scenario, version):
# urllib2.install_opener(opener)
# url = "http://127.0.0.1:8000/results?case=" + case + \
# "&period=30&installer=" + installer
- url = "http://testresults.opnfv.org/testapi/results?case=" + case + \
- "&period=" + str(PERIOD) + "&installer=" + installer + \
- "&scenario=" + scenario + "&version=" + version
+ url = ("http://testresults.opnfv.org/testapi/results?case=" + case +
+ "&period=" + str(PERIOD) + "&installer=" + installer +
+ "&scenario=" + scenario + "&version=" + version)
request = Request(url)
try:
@@ -239,7 +239,8 @@ tempest = TestCase("Tempest", "functest", -1)
# Retrieve the Functest configuration to detect which tests are relevant
# according to the installer, scenario
-response = requests.get('https://git.opnfv.org/cgit/functest/plain/testcases/config_functest.yaml')
+cf = "https://git.opnfv.org/cgit/functest/plain/testcases/config_functest.yaml"
+response = requests.get(cf)
functest_yaml_config = yaml.load(response.text)
print "****************************************"
@@ -276,17 +277,20 @@ for version in versions:
# print "testcase %s is %s" % (test_case.getName(),
# test_case.isRunnable)
print "--------------------------"
- print "installer %s, version %s, scenario %s:" % (installer, version, s)
+ print ("installer %s, version %s, scenario %s:" %
+ (installer, version, s))
for testCase in testCases:
time.sleep(1)
if testCase.isRunnable:
- print " Searching results for case %s " % (testCase.getName())
+ print (" Searching results for case %s " %
+ (testCase.getName()))
result = getResult(testCase, installer, s, version)
testCase.setCriteria(result)
items[s] = testCases
print "--------------------------"
except:
- print "installer %s, version %s, scenario %s" % (installer, version, s)
+ print ("installer %s, version %s, scenario %s" %
+ (installer, version, s))
print "No data available , error %s " % (sys.exc_info()[0])
print "****************************************"