summaryrefslogtreecommitdiffstats
path: root/utils/test/reporting/functest
diff options
context:
space:
mode:
Diffstat (limited to 'utils/test/reporting/functest')
-rwxr-xr-xutils/test/reporting/functest/reporting-tempest.py8
-rwxr-xr-xutils/test/reporting/functest/reporting-vims.py4
-rw-r--r--utils/test/reporting/functest/testCase.py33
3 files changed, 22 insertions, 23 deletions
diff --git a/utils/test/reporting/functest/reporting-tempest.py b/utils/test/reporting/functest/reporting-tempest.py
index 5d6bcc062..6e6585a32 100755
--- a/utils/test/reporting/functest/reporting-tempest.py
+++ b/utils/test/reporting/functest/reporting-tempest.py
@@ -44,7 +44,7 @@ for version in rp_utils.get_config('general.versions'):
response = urlopen(request)
k = response.read()
results = json.loads(k)
- except URLError, e:
+ except URLError as e:
logger.error("Error code: %s" % e)
test_results = results['results']
@@ -73,9 +73,9 @@ for version in rp_utils.get_config('general.versions'):
nb_tests_run = result['details']['tests']
nb_tests_failed = result['details']['failures']
if nb_tests_run != 0:
- success_rate = 100*((int(nb_tests_run) -
- int(nb_tests_failed)) /
- int(nb_tests_run))
+ success_rate = 100 * ((int(nb_tests_run) -
+ int(nb_tests_failed)) /
+ int(nb_tests_run))
else:
success_rate = 0
diff --git a/utils/test/reporting/functest/reporting-vims.py b/utils/test/reporting/functest/reporting-vims.py
index 2077d2a4a..b236b8963 100755
--- a/utils/test/reporting/functest/reporting-vims.py
+++ b/utils/test/reporting/functest/reporting-vims.py
@@ -51,7 +51,7 @@ for version in versions:
response = urlopen(request)
k = response.read()
results = json.loads(k)
- except URLError, e:
+ except URLError as e:
logger.error("Error code: %s" % e)
test_results = results['results']
@@ -91,7 +91,7 @@ for version in versions:
result['pr_step_ok'] = 0
if nb_step != 0:
- result['pr_step_ok'] = (float(nb_step_ok)/nb_step)*100
+ result['pr_step_ok'] = (float(nb_step_ok) / nb_step) * 100
try:
logger.debug("Scenario %s, Installer %s"
% (s_result[1]['scenario'], installer))
diff --git a/utils/test/reporting/functest/testCase.py b/utils/test/reporting/functest/testCase.py
index 8d90fc861..df0874e0b 100644
--- a/utils/test/reporting/functest/testCase.py
+++ b/utils/test/reporting/functest/testCase.py
@@ -36,14 +36,14 @@ class TestCase(object):
'moon': 'Moon',
'copper': 'Copper',
'security_scan': 'Security',
- 'multisite':'Multisite',
- 'domino':'Domino',
- 'odl-sfc':'SFC',
- 'onos_sfc':'SFC',
- 'parser':'Parser',
- 'connection_check':'Health (connection)',
- 'api_check':'Health (api)',
- 'snaps_smoke':'SNAPS' }
+ 'multisite': 'Multisite',
+ 'domino': 'Domino',
+ 'odl-sfc': 'SFC',
+ 'onos_sfc': 'SFC',
+ 'parser': 'Parser',
+ 'connection_check': 'Health (connection)',
+ 'api_check': 'Health (api)',
+ 'snaps_smoke': 'SNAPS'}
try:
self.displayName = display_name_matrix[self.name]
except:
@@ -131,14 +131,14 @@ class TestCase(object):
'moon': 'moon_authentication',
'copper': 'copper-notification',
'security_scan': 'security',
- 'multisite':'multisite',
- 'domino':'domino-multinode',
- 'odl-sfc':'functest-odl-sfc',
- 'onos_sfc':'onos_sfc',
- 'parser':'parser-basics',
- 'connection_check':'connection_check',
- 'api_check':'api_check',
- 'snaps_smoke':'snaps_smoke'
+ 'multisite': 'multisite',
+ 'domino': 'domino-multinode',
+ 'odl-sfc': 'functest-odl-sfc',
+ 'onos_sfc': 'onos_sfc',
+ 'parser': 'parser-basics',
+ 'connection_check': 'connection_check',
+ 'api_check': 'api_check',
+ 'snaps_smoke': 'snaps_smoke'
}
try:
return test_match_matrix[self.name]
@@ -147,4 +147,3 @@ class TestCase(object):
def getDisplayName(self):
return self.displayName
-