Code Review
/
releng.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix security issues of eval-s in testapi
[releng.git]
/
utils
/
test
/
result_collection_api
/
opnfv_testapi
/
tests
/
unit
/
test_dashboard.py
diff --git
a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_dashboard.py
b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_dashboard.py
index
8f729c0
..
27ec763
100644
(file)
--- a/
utils/test/result_collection_api/opnfv_testapi/tests/unit/test_dashboard.py
+++ b/
utils/test/result_collection_api/opnfv_testapi/tests/unit/test_dashboard.py
@@
-8,9
+8,10
@@
##############################################################################
import unittest
##############################################################################
import unittest
-from test_result import TestResultBase
from opnfv_testapi.common.constants import HTTP_NOT_FOUND, HTTP_OK
from opnfv_testapi.common.constants import HTTP_NOT_FOUND, HTTP_OK
+from test_result import TestResultBase
+
class TestDashboardBase(TestResultBase):
def setUp(self):
class TestDashboardBase(TestResultBase):
def setUp(self):
@@
-63,7
+64,7
@@
class TestDashboardQuery(TestDashboardBase):
if k == 'self' or k == 'uri':
continue
if v is None:
if k == 'self' or k == 'uri':
continue
if v is None:
- v =
eval('self.' +
k)
+ v =
self.__getattribute__(
k)
if v != 'missing':
uri += '{}={}&'.format(k, v)
uri += 'pod={}&'.format(self.pod)
if v != 'missing':
uri += '{}={}&'.format(k, v)
uri += 'pod={}&'.format(self.pod)