diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2023-09-29 14:12:18 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2023-09-29 14:36:57 +0200 |
commit | f430ee4d9ef63f104dde63710fce7f8fa3c61591 (patch) | |
tree | 9e9978c12b49e5717a8ea279197fa200100b6d7b /xtesting/core | |
parent | 781fc313c1c59018edb892ff0423963191781592 (diff) |
Upgrade pylint and fix latest warnings
Change-Id: I8b9e4b663a12ac9be18fded2d7b4e4b38428fa9f
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'xtesting/core')
-rw-r--r-- | xtesting/core/campaign.py | 3 | ||||
-rw-r--r-- | xtesting/core/testcase.py | 5 |
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 |