From a122713a5207a189d659d2d05d31e272b4c544f3 Mon Sep 17 00:00:00 2001 From: Gwenael Lambrouin Date: Thu, 9 Jun 2022 11:33:08 +0200 Subject: behave_tests: add unit tests for TestAPI client Change-Id: I31a8d774df406c993f6fb605eb09025d643c6e39 Signed-off-by: Gwenael Lambrouin --- behave_tests/features/steps/testapi.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'behave_tests/features') 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. -- cgit 1.2.3-korg