X-Git-Url: https://gerrit.onap.org/r/gitweb?p=vvp%2Fvalidation-scripts.git;a=blobdiff_plain;f=ice_validator%2Ftests%2Fconftest.py;h=3ab1abaf688611fed4514e4044cbbecf12ad50fb;hp=46680459f1667c7f69c786cc82151be20a07cb05;hb=981e09ed2538cd187b31e66f8c73792fb8d246eb;hpb=20c6955caddbb6e126755bbf4cc2412279d0a11f diff --git a/ice_validator/tests/conftest.py b/ice_validator/tests/conftest.py index 4668045..3ab1aba 100644 --- a/ice_validator/tests/conftest.py +++ b/ice_validator/tests/conftest.py @@ -284,7 +284,7 @@ class TestResult: return self.item.funcargs["yaml_files"] else: parts = self.result.nodeid.split("[") - return "" if len(parts) == 1 else parts[1][:-1] + return [""] if len(parts) == 1 else [parts[1][:-1]] def _get_error_message(self): """ @@ -1041,9 +1041,9 @@ def build_rst_json(reqs): else: # Creates links in RST format to requirements and test cases if values["test_case"]: - val_list = re.findall(r'(?<=\.).*', values["test_case"]) - val = TEST_SCRIPT_SITE + val_list[0] + ".py" - rst_value = ("`" + val_list[0] + " <" + val + ">`_") + mod = values["test_case"].split(".")[-1] + val = TEST_SCRIPT_SITE + mod + ".py" + rst_value = ("`" + mod + " <" + val + ">`_") title = "`" + values["id"] + " <" + VNFRQTS_ID_URL + values["docname"].replace(" ", "%20") + ".html#" + values["id"] + ">`_" data[key].update({'full_title': title, 'test_case': rst_value}) else: