testit-python-commons 5.2.1__tar.gz → 5.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/PKG-INFO +1 -1
  2. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/setup.py +1 -1
  3. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit.py +4 -0
  4. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/client/api_client.py +6 -3
  5. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/client/converter.py +12 -2
  6. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/decorators.py +14 -1
  7. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/dynamic_methods.py +12 -0
  8. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/models/test_result.py +14 -0
  9. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/services/adapter_manager.py +54 -19
  10. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/utils/html_escape_utils.py +12 -16
  11. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons.egg-info/PKG-INFO +1 -1
  12. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/tests/test_html_escape_utils.py +11 -0
  13. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/README.md +0 -0
  14. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/setup.cfg +0 -0
  15. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/__init__.py +0 -0
  16. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/api/__init__.py +0 -0
  17. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/api/attachments_api.py +0 -0
  18. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/api/auto_tests_api.py +0 -0
  19. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/api/configurations_api.py +0 -0
  20. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/api/custom_attributes_api.py +0 -0
  21. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/api/parameters_api.py +0 -0
  22. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/api/project_attributes_api.py +0 -0
  23. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/api/project_sections_api.py +0 -0
  24. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/api/project_work_items_api.py +0 -0
  25. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/api/projects_api.py +0 -0
  26. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/api/sections_api.py +0 -0
  27. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/api/test_results_api.py +0 -0
  28. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/api/test_runs_api.py +0 -0
  29. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/api/work_items_api.py +0 -0
  30. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/api/workflows_api.py +0 -0
  31. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/api_client.py +0 -0
  32. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/apis/__init__.py +0 -0
  33. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/configuration.py +0 -0
  34. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/exceptions.py +0 -0
  35. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/__init__.py +0 -0
  36. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_auto_tests_id_work_items_post_request.py +0 -0
  37. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_auto_tests_post_request.py +0 -0
  38. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_auto_tests_put_request.py +0 -0
  39. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_auto_tests_search_post_request.py +0 -0
  40. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_configurations_search_post_request.py +0 -0
  41. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_custom_attributes_global_id_put_request.py +0 -0
  42. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_custom_attributes_global_post_request.py +0 -0
  43. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_custom_attributes_search_post_request.py +0 -0
  44. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_parameters_post_request.py +0 -0
  45. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_parameters_search_post_request.py +0 -0
  46. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_projects_post_request.py +0 -0
  47. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_projects_project_id_attributes_put_request.py +0 -0
  48. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_projects_project_id_attributes_search_post_request.py +0 -0
  49. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_projects_project_id_work_items_search_post_request.py +0 -0
  50. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_projects_search_post_request.py +0 -0
  51. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_sections_post_request.py +0 -0
  52. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_test_results_id_put_request.py +0 -0
  53. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_test_results_search_post_request.py +0 -0
  54. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_test_runs_id_reruns_post_request.py +0 -0
  55. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_test_runs_post_request.py +0 -0
  56. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_test_runs_put_request.py +0 -0
  57. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/adapters_work_items_post_request.py +0 -0
  58. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/assign_attachment_api_model.py +0 -0
  59. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/assign_auto_test_case_id_api_model.py +0 -0
  60. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/assign_iteration_api_model.py +0 -0
  61. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/attachment_api_result.py +0 -0
  62. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/attachment_model.py +0 -0
  63. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/attachment_put_model.py +0 -0
  64. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/attachment_put_model_auto_test_step_results_model.py +0 -0
  65. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/attachment_update_request.py +0 -0
  66. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test.py +0 -0
  67. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_api_result.py +0 -0
  68. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_api_result_layer.py +0 -0
  69. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_case_api_model.py +0 -0
  70. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_create_api_model.py +0 -0
  71. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_create_api_model_layer.py +0 -0
  72. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_filter_api_model.py +0 -0
  73. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_id_model.py +0 -0
  74. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_model.py +0 -0
  75. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_model_last_test_result_configuration.py +0 -0
  76. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_model_last_test_result_status.py +0 -0
  77. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_result_reason_short.py +0 -0
  78. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_results_for_test_run_model.py +0 -0
  79. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_search_api_model.py +0 -0
  80. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_search_api_model_filter.py +0 -0
  81. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_search_api_model_includes.py +0 -0
  82. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_search_include_api_model.py +0 -0
  83. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_step.py +0 -0
  84. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_step_api_model.py +0 -0
  85. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_step_api_result.py +0 -0
  86. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_step_model.py +0 -0
  87. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_step_result.py +0 -0
  88. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_step_result_update_request.py +0 -0
  89. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_update_api_model.py +0 -0
  90. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/auto_test_work_item_identifier_api_result.py +0 -0
  91. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/available_test_result_outcome.py +0 -0
  92. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/configuration_filter_model.py +0 -0
  93. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/configuration_model.py +0 -0
  94. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/configuration_short_model.py +0 -0
  95. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/create_empty_test_run_api_model.py +0 -0
  96. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/create_link_api_model.py +0 -0
  97. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/create_parameter_api_model.py +0 -0
  98. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/create_project_api_model.py +0 -0
  99. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/create_step_api_model.py +0 -0
  100. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/create_work_item_api_model.py +0 -0
  101. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/custom_attribute_api_result.py +0 -0
  102. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/custom_attribute_model.py +0 -0
  103. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/custom_attribute_option_api_result.py +0 -0
  104. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/custom_attribute_option_model.py +0 -0
  105. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/custom_attribute_option_post_api_model.py +0 -0
  106. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/custom_attribute_option_update_api_model.py +0 -0
  107. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/custom_attribute_put_model.py +0 -0
  108. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/custom_attribute_search_api_model.py +0 -0
  109. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/custom_attribute_search_api_result.py +0 -0
  110. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/custom_attribute_type.py +0 -0
  111. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/custom_attribute_types_enum.py +0 -0
  112. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/date_time_range_selector_model.py +0 -0
  113. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/deletion_state.py +0 -0
  114. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/detailed_project_api_result.py +0 -0
  115. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/detailed_project_api_result_workflow.py +0 -0
  116. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/failure_category_model.py +0 -0
  117. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/global_custom_attribute_post_api_model.py +0 -0
  118. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/global_custom_attribute_update_api_model.py +0 -0
  119. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/guid_extraction_model.py +0 -0
  120. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/image_resize_type.py +0 -0
  121. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/int32_range_selector_model.py +0 -0
  122. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/int64_range_selector_model.py +0 -0
  123. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/iteration_api_result.py +0 -0
  124. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/iteration_model.py +0 -0
  125. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/label_api_model.py +0 -0
  126. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/label_api_result.py +0 -0
  127. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/label_short_model.py +0 -0
  128. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/layer_api_model.py +0 -0
  129. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/layer_api_result.py +0 -0
  130. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/layer_source.py +0 -0
  131. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/link_api_result.py +0 -0
  132. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/link_create_api_model.py +0 -0
  133. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/link_model.py +0 -0
  134. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/link_post_model.py +0 -0
  135. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/link_put_model.py +0 -0
  136. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/link_short_api_result.py +0 -0
  137. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/link_type.py +0 -0
  138. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/link_update_api_model.py +0 -0
  139. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/manual_rerun_api_result.py +0 -0
  140. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/manual_rerun_select_test_results_api_model.py +0 -0
  141. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/manual_rerun_select_test_results_api_model_extraction_model.py +0 -0
  142. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/manual_rerun_select_test_results_api_model_filter.py +0 -0
  143. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/manual_rerun_test_result_api_model.py +0 -0
  144. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/manual_rerun_test_result_api_model_test_result_ids.py +0 -0
  145. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/operation.py +0 -0
  146. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/parameter_api_result.py +0 -0
  147. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/parameter_iteration_model.py +0 -0
  148. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/parameter_short_api_result.py +0 -0
  149. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/parameter_short_model.py +0 -0
  150. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/parameters_filter_api_model.py +0 -0
  151. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/problem_details.py +0 -0
  152. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/project_api_result.py +0 -0
  153. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/project_attributes_filter_model.py +0 -0
  154. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/project_shortest_api_result.py +0 -0
  155. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/project_type_model.py +0 -0
  156. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/projects_filter_model.py +0 -0
  157. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/projects_filter_model_autotests_count.py +0 -0
  158. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/projects_filter_model_checklists_count.py +0 -0
  159. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/projects_filter_model_created_date.py +0 -0
  160. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/projects_filter_model_shared_steps_count.py +0 -0
  161. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/projects_filter_model_test_cases_count.py +0 -0
  162. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/section_model.py +0 -0
  163. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/section_post_model.py +0 -0
  164. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/section_shared_step.py +0 -0
  165. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/section_with_steps_model.py +0 -0
  166. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/shared_step_model.py +0 -0
  167. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/shared_step_result_api_model.py +0 -0
  168. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/step_comment_api_model.py +0 -0
  169. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/step_model.py +0 -0
  170. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/step_post_model.py +0 -0
  171. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/step_result_api_model.py +0 -0
  172. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/tag_model.py +0 -0
  173. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/test_result_link_api_result.py +0 -0
  174. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/test_result_outcome.py +0 -0
  175. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/test_result_response.py +0 -0
  176. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/test_result_short_response.py +0 -0
  177. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/test_result_short_response_status.py +0 -0
  178. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/test_result_step_comment_update_request.py +0 -0
  179. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/test_result_update_request.py +0 -0
  180. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/test_results_filter_api_model.py +0 -0
  181. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/test_results_filter_api_model_duration.py +0 -0
  182. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/test_run_api_result.py +0 -0
  183. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/test_run_api_result_status.py +0 -0
  184. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/test_run_state.py +0 -0
  185. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/test_status_api_result.py +0 -0
  186. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/test_status_api_type.py +0 -0
  187. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/test_status_model.py +0 -0
  188. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/test_status_type.py +0 -0
  189. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/update_empty_test_run_api_model.py +0 -0
  190. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/update_link_api_model.py +0 -0
  191. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/validation_problem_details.py +0 -0
  192. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/work_item_api_result.py +0 -0
  193. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/work_item_entity_type_api_model.py +0 -0
  194. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/work_item_filter_api_model.py +0 -0
  195. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/work_item_filter_api_model_duration.py +0 -0
  196. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/work_item_id_api_model.py +0 -0
  197. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/work_item_parameter_key_api_model.py +0 -0
  198. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/work_item_parameter_key_api_result.py +0 -0
  199. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/work_item_priority_api_model.py +0 -0
  200. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/work_item_priority_model.py +0 -0
  201. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/work_item_select_api_model.py +0 -0
  202. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/work_item_select_api_model_filter.py +0 -0
  203. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/work_item_short_api_result.py +0 -0
  204. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/work_item_source_type_model.py +0 -0
  205. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/work_item_state_api_model.py +0 -0
  206. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/work_item_states.py +0 -0
  207. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/work_item_type_model.py +0 -0
  208. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/workflow_api_result.py +0 -0
  209. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model/workflow_status_api_result.py +0 -0
  210. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/model_utils.py +0 -0
  211. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/models/__init__.py +0 -0
  212. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/adapters_api/rest.py +0 -0
  213. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/__init__.py +0 -0
  214. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/api/__init__.py +0 -0
  215. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/api/completion_api.py +0 -0
  216. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/api/health_api.py +0 -0
  217. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/api/system_api.py +0 -0
  218. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/api/test_results_api.py +0 -0
  219. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/api/workers_api.py +0 -0
  220. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/api_client.py +0 -0
  221. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/apis/__init__.py +0 -0
  222. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/configuration.py +0 -0
  223. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/exceptions.py +0 -0
  224. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/model/__init__.py +0 -0
  225. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/model/completion_response.py +0 -0
  226. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/model/health_status_response.py +0 -0
  227. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/model/register_request.py +0 -0
  228. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/model/register_response.py +0 -0
  229. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/model/set_worker_status_request.py +0 -0
  230. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/model/set_worker_status_response.py +0 -0
  231. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/model/shutdown_response.py +0 -0
  232. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/model/test_result_cut_api_model.py +0 -0
  233. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/model/test_result_save_response.py +0 -0
  234. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/model_utils.py +0 -0
  235. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/models/__init__.py +0 -0
  236. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/api_client_syncstorage/rest.py +0 -0
  237. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/__init__.py +0 -0
  238. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/app_properties.py +0 -0
  239. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/client/__init__.py +0 -0
  240. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/client/client_configuration.py +0 -0
  241. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/client/helpers/__init__.py +0 -0
  242. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/client/helpers/bulk_autotest_helper.py +0 -0
  243. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/client/helpers/test_result_matching.py +0 -0
  244. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/client/helpers/threads_manager.py +0 -0
  245. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/client/models/__init__.py +0 -0
  246. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/client/models/threads_for_create_and_result.py +0 -0
  247. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/client/models/threads_for_update_and_result.py +0 -0
  248. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/configurations/__init__.py +0 -0
  249. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/configurations/properties_names.py +0 -0
  250. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/models/__init__.py +0 -0
  251. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/models/adapter_mode.py +0 -0
  252. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/models/fixture.py +0 -0
  253. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/models/link.py +0 -0
  254. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/models/link_type.py +0 -0
  255. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/models/outcome_type.py +0 -0
  256. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/models/status_type.py +0 -0
  257. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/models/step_result.py +0 -0
  258. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/models/test_layers.py +0 -0
  259. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/models/test_result_with_all_fixture_step_results_model.py +0 -0
  260. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/services/__init__.py +0 -0
  261. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/services/adapter_manager_configuration.py +0 -0
  262. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/services/fixture_manager.py +0 -0
  263. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/services/fixture_storage.py +0 -0
  264. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/services/logger.py +0 -0
  265. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/services/plugin_manager.py +0 -0
  266. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/services/retry.py +0 -0
  267. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/services/step_manager.py +0 -0
  268. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/services/step_result_storage.py +0 -0
  269. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/services/sync_storage/__init__.py +0 -0
  270. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/services/sync_storage/sync_storage_runner.py +0 -0
  271. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/services/test_run_metadata.py +0 -0
  272. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/services/utils.py +0 -0
  273. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/step.py +0 -0
  274. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons/utils/__init__.py +0 -0
  275. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons.egg-info/SOURCES.txt +0 -0
  276. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons.egg-info/dependency_links.txt +0 -0
  277. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons.egg-info/requires.txt +0 -0
  278. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/src/testit_python_commons.egg-info/top_level.txt +0 -0
  279. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/tests/test_app_properties.py +0 -0
  280. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/tests/test_dynamic_methods.py +0 -0
  281. {testit_python_commons-5.2.1 → testit_python_commons-5.2.3}/tests/test_xss_parameters_escape.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: testit-python-commons
3
- Version: 5.2.1
3
+ Version: 5.2.3
4
4
  Summary: Python commons for Test IT
5
5
  Home-page: https://github.com/testit-tms/adapters-python/
6
6
  Author: Integration team
@@ -1,6 +1,6 @@
1
1
  from setuptools import find_packages, setup
2
2
 
3
- VERSION = "5.2.1"
3
+ VERSION = "5.2.3"
4
4
 
5
5
  setup(
6
6
  name='testit-python-commons',
@@ -12,6 +12,7 @@ from testit_python_commons.decorators import (
12
12
  nameSpace,
13
13
  title,
14
14
  workItemID,
15
+ workItemId,
15
16
  workItemIds
16
17
  )
17
18
  from testit_python_commons.dynamic_methods import (
@@ -19,6 +20,7 @@ from testit_python_commons.dynamic_methods import (
19
20
  addLink,
20
21
  addLinks,
21
22
  addMessage,
23
+ addWorkItemId,
22
24
  addWorkItemIds,
23
25
  addDisplayName,
24
26
  addNameSpace,
@@ -43,6 +45,7 @@ __all__ = [
43
45
  'nameSpace',
44
46
  'className',
45
47
  'workItemID',
48
+ 'workItemId',
46
49
  'workItemIds',
47
50
  'title',
48
51
  'description',
@@ -57,6 +60,7 @@ __all__ = [
57
60
  'addAttachments',
58
61
  'message',
59
62
  'addMessage',
63
+ 'addWorkItemId',
60
64
  'addWorkItemIds',
61
65
  'addDisplayName',
62
66
  'addNameSpace',
@@ -266,9 +266,9 @@ class ApiClientWorker:
266
266
  self,
267
267
  test_results: List[TestResult],
268
268
  fixture_containers: dict,
269
- finalized_external_ids: set = None) -> None:
269
+ finalized_result_keys: set = None) -> None:
270
270
  logging.debug("call __write_tests")
271
- finalized_external_ids = finalized_external_ids or set()
271
+ finalized_result_keys = finalized_result_keys or set()
272
272
  bulk_autotest_helper = BulkAutotestHelper(self.__autotest_api, self.__test_run_api, self.__config)
273
273
  create_count = 0
274
274
  update_count = 0
@@ -278,8 +278,11 @@ class ApiClientWorker:
278
278
  for test_result in test_results:
279
279
  test_result = self.__add_fixtures_to_test_result(test_result, fixture_containers)
280
280
  external_id = test_result.get_external_id()
281
+ finalize_key = test_result.get_finalize_key()
281
282
 
282
- if external_id in finalized_external_ids:
283
+ # Skip only the same invocation (Java: by UUID). Bare externalId would
284
+ # drop other parametrize iterations that share one autotest id.
285
+ if finalize_key in finalized_result_keys:
283
286
  skip_count += 1
284
287
  logging.info(
285
288
  'Bulk import: skip sendTestResults for %s (already finalized at test finish)',
@@ -45,9 +45,19 @@ from testit_python_commons.models.step_result import StepResult
45
45
  from testit_python_commons.models.test_result import TestResult
46
46
  from testit_python_commons.models.test_result_with_all_fixture_step_results_model import TestResultWithAllFixtureStepResults
47
47
  from testit_python_commons.services.logger import adapter_logger
48
+ from testit_python_commons.utils.html_escape_utils import HtmlEscapeUtils
48
49
 
49
50
 
50
51
  class Converter:
52
+ @staticmethod
53
+ def _escape_string_map(values: Optional[dict]) -> Optional[dict]:
54
+ if not values:
55
+ return values
56
+ return {
57
+ str(key): HtmlEscapeUtils.escape_html_tags(str(value)) if value is not None else value
58
+ for key, value in values.items()
59
+ }
60
+
51
61
  @staticmethod
52
62
  @adapter_logger
53
63
  def test_run_to_test_run_short_model(
@@ -402,8 +412,8 @@ class Converter:
402
412
  test_result.get_teardown_results()),
403
413
  traces=test_result.get_traces(),
404
414
  attachments=test_result.get_attachments(),
405
- parameters=test_result.get_parameters(),
406
- properties=test_result.get_properties(),
415
+ parameters=cls._escape_string_map(test_result.get_parameters()),
416
+ properties=cls._escape_string_map(test_result.get_properties()),
407
417
  links=cls.links_to_links_post_model(
408
418
  test_result.get_result_links()),
409
419
  duration=round(test_result.get_duration()),
@@ -37,7 +37,7 @@ def inner(function):
37
37
  return function
38
38
 
39
39
 
40
- @Utils.deprecated('Use "workItemIds" instead.')
40
+ @Utils.deprecated('Use "workItemId" instead.')
41
41
  @adapter_logger
42
42
  def workItemID(*test_workitems_id: int or str): # noqa: N802
43
43
  def outer(function):
@@ -49,6 +49,19 @@ def workItemID(*test_workitems_id: int or str): # noqa: N802
49
49
  return outer
50
50
 
51
51
 
52
+ @adapter_logger
53
+ def workItemId(globalId: int or str): # noqa: N802
54
+ """
55
+ specifies a method that links an autotest with a manual test. Receives a single globalId
56
+ """
57
+ def outer(function):
58
+ function.test_workitems_id = [str(globalId)]
59
+ return inner(function)
60
+
61
+ return outer
62
+
63
+
64
+ @Utils.deprecated('Use "workItemId" instead.')
52
65
  @adapter_logger
53
66
  def workItemIds(*test_workitems_id: int or str): # noqa: N802
54
67
  """
@@ -130,6 +130,7 @@ def __add_attachments_to_test(data, is_text: bool = False, name: str = None):
130
130
  logging.warning(f'({data}) is not path!')
131
131
 
132
132
 
133
+ @Utils.deprecated('Use "addWorkItemId" instead.')
133
134
  @adapter_logger
134
135
  def addWorkItemIds(*test_work_item_ids: int or str): # noqa: N802
135
136
  """
@@ -142,6 +143,17 @@ def addWorkItemIds(*test_work_item_ids: int or str): # noqa: N802
142
143
  TmsPluginManager.get_plugin_manager().hook.add_work_item_id(test_work_item_id=str(test_work_item_id))
143
144
 
144
145
 
146
+ @adapter_logger
147
+ def addWorkItemId(globalId: int or str): # noqa: N802
148
+ """
149
+ a dynamic method that links an autotest with a manual test. Receives a single globalId
150
+ """
151
+ if not hasattr(TmsPluginManager.get_plugin_manager().hook, 'add_work_item_id'):
152
+ return
153
+
154
+ TmsPluginManager.get_plugin_manager().hook.add_work_item_id(test_work_item_id=str(globalId))
155
+
156
+
145
157
  @adapter_logger
146
158
  def addDisplayName(test_display_name: str): # noqa: N802
147
159
  """
@@ -1,3 +1,4 @@
1
+ import json
1
2
  from typing import List
2
3
 
3
4
  from testit_python_commons.models.link import Link
@@ -297,6 +298,19 @@ class TestResult:
297
298
  def get_external_key(self) -> str:
298
299
  return self.__external_key
299
300
 
301
+ def get_finalize_key(self) -> str:
302
+ """
303
+ Identity of one test invocation for bulk dedupe (parametrize-safe).
304
+ Prefer externalKey (e.g. pytest node id); else externalId + parameters.
305
+ """
306
+ if self.__external_key:
307
+ return self.__external_key
308
+ params = self.__parameters or {}
309
+ return '{0}\n{1}'.format(
310
+ self.__external_id,
311
+ json.dumps(params, sort_keys=True, default=str, ensure_ascii=False),
312
+ )
313
+
300
314
  @adapter_logger
301
315
  def set_layer(self, layer: str):
302
316
  self.__layer = HtmlEscapeUtils.escape_html_tags(layer) if layer else None
@@ -5,6 +5,7 @@ import uuid
5
5
  from testit_python_commons.client.api_client import ApiClientWorker
6
6
  from testit_python_commons.client.client_configuration import ClientConfiguration
7
7
  from testit_python_commons.models.adapter_mode import AdapterMode
8
+ from testit_python_commons.models.status_type import StatusType
8
9
  from testit_python_commons.models.test_result import TestResult
9
10
  from testit_python_commons.services.adapter_manager_configuration import (
10
11
  AdapterManagerConfiguration,
@@ -18,6 +19,7 @@ from testit_python_commons.services.sync_storage.sync_storage_runner import (
18
19
  )
19
20
 
20
21
  SYNC_STORAGE_AVAILABLE = True
22
+ IN_PROGRESS_LITERAL = "InProgress"
21
23
 
22
24
 
23
25
  class AdapterManager:
@@ -33,6 +35,9 @@ class AdapterManager:
33
35
  self.__api_client = ApiClientWorker(client_configuration)
34
36
  self.__fixture_manager = fixture_manager
35
37
  self.__test_result_map = {}
38
+ # Keys of results already sent at test finish (externalKey or externalId+params).
39
+ # Must not be bare externalId — parametrize shares one externalId.
40
+ self.__finalized_result_keys = set()
36
41
  self.__test_results = []
37
42
  self.__test_run_metadata_applied = False
38
43
 
@@ -146,23 +151,32 @@ class AdapterManager:
146
151
 
147
152
  @adapter_logger
148
153
  def write_test(self, test_result: TestResult) -> None:
149
- if self.__config.should_import_realtime():
150
- self.__write_test_realtime(test_result)
151
- return
152
-
153
- # for realtime false
154
- # if
155
- logging.debug("Is already in progress: " + str(self.__is_already_in_progress()))
156
- # Handle Sync Storage integration if available
157
- # Check if current worker is master and no test is in progress
158
- if self.__is_active_syncstorage_instance() and self.__is_master_and_no_in_progress():
159
- logging.debug(f"Outcome: {test_result.get_outcome()}")
160
- is_ok = self.on_master_no_already_in_progress(test_result)
161
- if is_ok:
154
+ try:
155
+ if self.__config.should_import_realtime():
156
+ self.__write_test_realtime(test_result)
162
157
  return
163
- # else continue normal processing
164
158
 
165
- self.__test_results.append(test_result)
159
+ # for realtime false
160
+ # if
161
+ logging.debug("Is already in progress: " + str(self.__is_already_in_progress()))
162
+ # Handle Sync Storage integration if available
163
+ # Check if current worker is master and no test is in progress
164
+ if self.__is_active_syncstorage_instance() and self.__is_master_and_no_in_progress():
165
+ logging.debug(f"Outcome: {test_result.get_outcome()}")
166
+ is_ok = self.on_master_no_already_in_progress(test_result)
167
+ if is_ok:
168
+ return
169
+ # else continue normal processing
170
+
171
+ self.__test_results.append(test_result)
172
+ except Exception as exc:
173
+ # Do not abort the pytest/session run if TMS rejects one result (e.g. XSS validation)
174
+ logging.error(
175
+ 'Failed to write test result for external_id="%s", parameters=%s: %s',
176
+ test_result.get_external_id(),
177
+ test_result.get_parameters(),
178
+ exc,
179
+ )
166
180
 
167
181
 
168
182
  @adapter_logger
@@ -189,12 +203,31 @@ class AdapterManager:
189
203
  self.__sync_storage_runner.set_is_already_in_progress(True)
190
204
 
191
205
  try:
192
- # Final status via sendTestResults (create); never change status via PUT.
206
+ # Mode 0: finalize in TMS now (TP-bound InProgress / orphan fix).
207
+ # Modes 1/2: post InProgress to TMS; Work X finalizes from the cut.
208
+ if self.__config.get_mode() == AdapterMode.USE_FILTER:
209
+ logging.debug(
210
+ "SyncStorage accepted %s; sendTestResults with final status (mode 0)",
211
+ test_result.get_external_id(),
212
+ )
213
+ self._write_test_realtime_internal(test_result)
214
+ return True
215
+
216
+ final_outcome = test_result.get_outcome()
217
+ final_status_type = test_result.get_status_type()
193
218
  logging.debug(
194
- "SyncStorage accepted %s; sendTestResults with final status",
219
+ "SyncStorage accepted %s; sendTestResults InProgress (Work X will finalize)",
195
220
  test_result.get_external_id(),
196
221
  )
197
- self._write_test_realtime_internal(test_result)
222
+ try:
223
+ test_result.set_outcome(IN_PROGRESS_LITERAL)
224
+ test_result.set_status_type(StatusType.INPROGRESS)
225
+ self._write_test_realtime_internal(test_result)
226
+ finally:
227
+ if final_outcome is not None:
228
+ test_result.set_outcome(final_outcome)
229
+ if final_status_type is not None:
230
+ test_result.set_status_type(final_status_type)
198
231
  return True
199
232
  except Exception as e:
200
233
  logging.warning(
@@ -233,7 +266,9 @@ class AdapterManager:
233
266
  logging.warning(test_result)
234
267
  return
235
268
 
269
+ # Fixture attach (realtime) still indexes by externalId.
236
270
  self.__test_result_map[ext_id] = test_result_id
271
+ self.__finalized_result_keys.add(test_result.get_finalize_key())
237
272
 
238
273
  @adapter_logger
239
274
  def write_tests(self) -> None:
@@ -265,7 +300,7 @@ class AdapterManager:
265
300
  self.__api_client.write_tests(
266
301
  self.__test_results,
267
302
  fixtures,
268
- finalized_external_ids=set(self.__test_result_map.keys()),
303
+ finalized_result_keys=set(self.__finalized_result_keys),
269
304
  )
270
305
 
271
306
  @adapter_logger
@@ -15,23 +15,18 @@ class HtmlEscapeUtils:
15
15
 
16
16
  NO_ESCAPE_HTML_ENV_VAR = "NO_ESCAPE_HTML"
17
17
 
18
- # Regex pattern to detect HTML tags (requires at least one non-whitespace character after <)
19
- # This ensures empty <> brackets are not considered HTML tags
20
- _HTML_TAG_PATTERN = re.compile(r'<\S.*?(?:>|/>)')
21
-
22
- # Regex patterns to escape only non-escaped characters
23
- # Using negative lookbehind to avoid double escaping
24
- _LESS_THAN_PATTERN = re.compile('<')
25
- _GREATER_THAN_PATTERN = re.compile('>')
26
-
18
+ # Align with Java adapters: tag must start with letter, '!' or '/'
19
+ _HTML_TAG_PATTERN = re.compile(
20
+ r'''<[a-zA-Z!/][^<>"']*(?:"[^"]*"[^<>"']*|'[^']*'[^<>"']*)*>'''
21
+ )
22
+
27
23
  @staticmethod
28
24
  def escape_html_tags(text: Optional[str]) -> Optional[str]:
29
25
  """
30
26
  Escapes HTML tags to prevent XSS attacks.
31
27
  First checks if the string contains HTML tags using regex pattern.
32
28
  Only performs escaping if HTML tags are detected.
33
- Escapes all < as \\< and > as \\> only if they are not already escaped.
34
- Uses regex with negative lookbehind to avoid double escaping.
29
+ Escapes < as &lt; and > as &gt; (idempotent for already-escaped text).
35
30
 
36
31
  Args:
37
32
  text: The text to escape
@@ -51,11 +46,7 @@ class HtmlEscapeUtils:
51
46
  if not HtmlEscapeUtils._HTML_TAG_PATTERN.search(text):
52
47
  return text # No HTML tags found, return original string
53
48
 
54
- # Use regex with negative lookbehind to escape only non-escaped characters
55
- result = HtmlEscapeUtils._LESS_THAN_PATTERN.sub('&lt;', text)
56
- result = HtmlEscapeUtils._GREATER_THAN_PATTERN.sub('&gt;', result)
57
-
58
- return result
49
+ return text.replace('<', '&lt;').replace('>', '&gt;')
59
50
 
60
51
  @staticmethod
61
52
  def escape_html_in_object(obj: Any) -> Any:
@@ -190,6 +181,11 @@ class HtmlEscapeUtils:
190
181
  HtmlEscapeUtils._process_list(value)
191
182
  elif isinstance(value, dict):
192
183
  HtmlEscapeUtils._process_dict(value)
184
+ try:
185
+ # Write back so OpenAPI models that return dict copies keep escaped values
186
+ setattr(obj, attr_name, value)
187
+ except AttributeError:
188
+ pass
193
189
  elif value is not None and not HtmlEscapeUtils._is_simple_type(type(value)):
194
190
  # Process nested objects (but not simple types)
195
191
  HtmlEscapeUtils.escape_html_in_object(value)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: testit-python-commons
3
- Version: 5.2.1
3
+ Version: 5.2.3
4
4
  Summary: Python commons for Test IT
5
5
  Home-page: https://github.com/testit-tms/adapters-python/
6
6
  Author: Integration team
@@ -176,6 +176,17 @@ class TestHtmlEscapeUtils(unittest.TestCase):
176
176
  )
177
177
  self.assertEqual(model.message, "&lt;img src=x onerror=alert(1)&gt;")
178
178
 
179
+ def test_client_s_tag_param_and_legacy_entities(self):
180
+ """Plain <s>/<script> params escape to entities; already-escaped text stays stable."""
181
+ self.assertEqual(
182
+ HtmlEscapeUtils.escape_html_tags('<s>alert("1")</s>'),
183
+ '&lt;s&gt;alert("1")&lt;/s&gt;',
184
+ )
185
+ self.assertEqual(
186
+ HtmlEscapeUtils.escape_html_tags('&lt;script&gt;alert("1")&lt;/script&gt;'),
187
+ '&lt;script&gt;alert("1")&lt;/script&gt;',
188
+ )
189
+
179
190
 
180
191
  if __name__ == '__main__':
181
192
  unittest.main()