From 558410334c8eace6764f9bc55ed11a5e991da54a Mon Sep 17 00:00:00 2001 From: Dmitry Ermakovich Date: Fri, 30 Jan 2026 18:05:13 +0300 Subject: [PATCH] fix: fix TMS-37357 issue with externalId html --- README.md | 2 +- testit-adapter-behave/setup.py | 2 +- testit-adapter-nose/setup.py | 2 +- testit-adapter-pytest/setup.py | 2 +- testit-adapter-robotframework/setup.py | 2 +- testit-python-commons/setup.py | 2 +- testit-python-commons/src/testit_python_commons/decorators.py | 3 ++- .../src/testit_python_commons/models/test_result.py | 4 +++- .../src/testit_python_commons/utils/html_escape_utils.py | 2 ++ 9 files changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 97a8746..5790b6d 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Status](https://img.shields.io/pypi/v/testit-python-commons?style=plastic)](http | 5.3 | 3.6.1.post530 | 3.6.1.post530 | 3.6.1.post530 | 3.6.1.post530 | | 5.4 | 3.6.6.post540 | 3.6.6.post540 | 3.6.6.post540 | 3.6.6.post540 | | 5.5 | 3.10.1.post550 | 3.10.1.post550 | 3.10.1.post550 | 3.10.1.post550 | -| 5.6 | 3.11.0.post560 | 3.11.0.post560 | 3.11.0.post560 | 3.11.0.post560 | +| 5.6 | 3.11.1.post560 | 3.11.1.post560 | 3.11.1.post560 | 3.11.1.post560 | | Cloud | 3.10.4 + | 3.10.4 + | 3.10.4 + | 3.10.4 + | 1. For current versions, see the releases tab. diff --git a/testit-adapter-behave/setup.py b/testit-adapter-behave/setup.py index 9eaca89..83532ae 100644 --- a/testit-adapter-behave/setup.py +++ b/testit-adapter-behave/setup.py @@ -1,6 +1,6 @@ from setuptools import find_packages, setup -VERSION = "3.11.0.post560" +VERSION = "3.11.1.post560" setup( name='testit-adapter-behave', diff --git a/testit-adapter-nose/setup.py b/testit-adapter-nose/setup.py index 34273c1..9efc20d 100644 --- a/testit-adapter-nose/setup.py +++ b/testit-adapter-nose/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -VERSION = "3.11.0.post560" +VERSION = "3.11.1.post560" setup( name='testit-adapter-nose', diff --git a/testit-adapter-pytest/setup.py b/testit-adapter-pytest/setup.py index 11887fd..06229a7 100644 --- a/testit-adapter-pytest/setup.py +++ b/testit-adapter-pytest/setup.py @@ -1,6 +1,6 @@ from setuptools import find_packages, setup -VERSION = "3.11.0.post560" +VERSION = "3.11.1.post560" setup( name='testit-adapter-pytest', diff --git a/testit-adapter-robotframework/setup.py b/testit-adapter-robotframework/setup.py index 4a03ec6..26d6a70 100644 --- a/testit-adapter-robotframework/setup.py +++ b/testit-adapter-robotframework/setup.py @@ -1,6 +1,6 @@ from setuptools import find_packages, setup -VERSION = "3.11.0.post560" +VERSION = "3.11.1.post560" setup( name='testit-adapter-robotframework', diff --git a/testit-python-commons/setup.py b/testit-python-commons/setup.py index 60cc6a3..4b1ad06 100644 --- a/testit-python-commons/setup.py +++ b/testit-python-commons/setup.py @@ -1,6 +1,6 @@ from setuptools import find_packages, setup -VERSION = "3.11.0.post560" +VERSION = "3.11.1.post560" setup( name='testit-python-commons', diff --git a/testit-python-commons/src/testit_python_commons/decorators.py b/testit-python-commons/src/testit_python_commons/decorators.py index 81812c4..ce957d3 100644 --- a/testit-python-commons/src/testit_python_commons/decorators.py +++ b/testit-python-commons/src/testit_python_commons/decorators.py @@ -1,4 +1,5 @@ import asyncio +import inspect import logging import types from functools import wraps @@ -28,7 +29,7 @@ async def async_wrapper(*args, **kwargs): await function(*args, **kwargs) if isinstance(function, types.FunctionType): - if asyncio.iscoroutinefunction(function): + if inspect.iscoroutinefunction(function): return async_wrapper return sync_wrapper diff --git a/testit-python-commons/src/testit_python_commons/models/test_result.py b/testit-python-commons/src/testit_python_commons/models/test_result.py index 174bb76..88ffc25 100644 --- a/testit-python-commons/src/testit_python_commons/models/test_result.py +++ b/testit-python-commons/src/testit_python_commons/models/test_result.py @@ -34,7 +34,9 @@ class TestResult: @adapter_logger def set_external_id(self, external_id: str): - self.__external_id = HtmlEscapeUtils.escape_html_tags(external_id) + # don't use escaping for externalId + # self.__external_id = HtmlEscapeUtils.escape_html_tags(external_id) + self.__external_id = external_id return self diff --git a/testit-python-commons/src/testit_python_commons/utils/html_escape_utils.py b/testit-python-commons/src/testit_python_commons/utils/html_escape_utils.py index 14f41d0..f1ad79b 100644 --- a/testit-python-commons/src/testit_python_commons/utils/html_escape_utils.py +++ b/testit-python-commons/src/testit_python_commons/utils/html_escape_utils.py @@ -123,6 +123,8 @@ def _process_object_attributes(obj: Any) -> None: # Skip private/protected attributes and methods if attr_name.startswith('_') or callable(getattr(obj, attr_name, None)): continue + if attr_name.startswith("external_id") or attr_name.startswith("externalId"): + continue try: value = getattr(obj, attr_name)