summaryrefslogtreecommitdiffstats
path: root/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
commit6d0378085d73ee962281f9bc81c4c97df4654c3f (patch)
tree2a99180e3c6e42233821a16b27883ed4597bca40 /reporting/functest
parentce39438884f690364210fb6e4017b0f5ea094eaf (diff)
Improve code quality (flake8)
Change-Id: Id58236ab080bc7dd5d9d7b98c4a0fce27ee1b7ad Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'reporting/functest')
-rw-r--r--reporting/functest/reporting-status.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/reporting/functest/reporting-status.py b/reporting/functest/reporting-status.py
index 9e6aeb1..2eb0f50 100644
--- a/reporting/functest/reporting-status.py
+++ b/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 "****************************************"