diff options
author | Gwenael Lambrouin <gwenael.lambrouin@orange.com> | 2022-06-09 11:33:08 +0200 |
---|---|---|
committer | Gwenael Lambrouin <gwenael.lambrouin@orange.com> | 2022-10-17 17:57:25 +0200 |
commit | a122713a5207a189d659d2d05d31e272b4c544f3 (patch) | |
tree | f85fa7e8452939a23f686527cf0a25bcbdc5bf74 /behave_tests/features | |
parent | 4236eba523bf0ac08ee32a010f861e00f791350d (diff) |
behave_tests: add unit tests for TestAPI client
Change-Id: I31a8d774df406c993f6fb605eb09025d643c6e39
Signed-off-by: Gwenael Lambrouin <gwenael.lambrouin@orange.com>
Diffstat (limited to 'behave_tests/features')
-rw-r--r-- | behave_tests/features/steps/testapi.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/behave_tests/features/steps/testapi.py b/behave_tests/features/steps/testapi.py index 67e5104..aff7589 100644 --- a/behave_tests/features/steps/testapi.py +++ b/behave_tests/features/steps/testapi.py @@ -15,21 +15,21 @@ # import json +import logging import requests class TestapiClient: - def __init__(self, testapi_url: str, logger): + __test__ = False # Hint for pytest: TestapiClient is not a test class. + + def __init__(self, testapi_url: str): """ Args: testapi_url: testapi URL as a string, for instance "http://172.20.73.203:8000/api/v1/results" - - logger: reference to behave_tests logger. - """ self._base_url = testapi_url - self._logger = logger + self._logger = logging.getLogger("behave_tests") def find_last_result(self, testapi_params, scenario_tag: str, nfvbench_test_input): """Search testapi database and return latest result matching filters. |