aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/core
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2023-09-29 14:12:18 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2023-09-29 15:33:41 +0200
commit07de2b2c47f257a8b5a77c9609d991cca3238d70 (patch)
treefa5a9d08658a061c2dc8af1d0ebb2c987bccd0f2 /xtesting/core
parent12291e8c7c0a1ad83b28c745deeeb2301df6c648 (diff)
Upgrade pylint and fix latest warnings
Change-Id: I8b9e4b663a12ac9be18fded2d7b4e4b38428fa9f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit f430ee4d9ef63f104dde63710fce7f8fa3c61591)
Diffstat (limited to 'xtesting/core')
-rw-r--r--xtesting/core/campaign.py3
-rw-r--r--xtesting/core/testcase.py5
2 files changed, 5 insertions, 3 deletions
diff --git a/xtesting/core/campaign.py b/xtesting/core/campaign.py
index 901df587..98b2f1a8 100644
--- a/xtesting/core/campaign.py
+++ b/xtesting/core/campaign.py
@@ -70,7 +70,8 @@ class Campaign():
url = env.get('TEST_DB_URL')
req = requests.get(
f"{url}?build_tag={env.get('BUILD_TAG')}",
- headers=testcase.TestCase.headers)
+ headers=testcase.TestCase.headers,
+ timeout=10)
req.raise_for_status()
output = req.json()
Campaign.__logger.debug("data from DB: \n%s", output)
diff --git a/xtesting/core/testcase.py b/xtesting/core/testcase.py
index b44ed793..380adc5e 100644
--- a/xtesting/core/testcase.py
+++ b/xtesting/core/testcase.py
@@ -149,7 +149,7 @@ class TestCase(metaclass=abc.ABCMeta):
self.__logger.error("Please run test before checking the results")
return TestCase.EX_TESTCASE_FAILED
- def check_requirements(self): # pylint: disable=no-self-use
+ def check_requirements(self):
"""Check the requirements of the test case.
It can be overriden on purpose.
@@ -235,7 +235,8 @@ class TestCase(metaclass=abc.ABCMeta):
data["version"] = "unknown"
req = requests.post(
url, data=json.dumps(data, sort_keys=True),
- headers=self.headers)
+ headers=self.headers,
+ timeout=10)
req.raise_for_status()
if urlparse(url).scheme != "file":
# href must be postprocessed as OPNFV testapi is misconfigured