aboutsummaryrefslogtreecommitdiffstats
path: root/behave_tests
diff options
context:
space:
mode:
authorGwenael Lambrouin <gwenael.lambrouin@orange.com>2022-06-09 11:33:08 +0200
committerGwenael Lambrouin <gwenael.lambrouin@orange.com>2022-10-17 17:57:25 +0200
commita122713a5207a189d659d2d05d31e272b4c544f3 (patch)
treef85fa7e8452939a23f686527cf0a25bcbdc5bf74 /behave_tests
parent4236eba523bf0ac08ee32a010f861e00f791350d (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')
-rw-r--r--behave_tests/features/steps/testapi.py10
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.