testit-python-commons 3.2.5__tar.gz → 3.3.0__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 (37) hide show
  1. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/PKG-INFO +2 -2
  2. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/setup.py +2 -2
  3. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/client/api_client.py +6 -6
  4. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/client/converter.py +16 -16
  5. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/services/utils.py +6 -0
  6. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/step.py +3 -1
  7. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons.egg-info/PKG-INFO +2 -2
  8. testit_python_commons-3.3.0/src/testit_python_commons.egg-info/requires.txt +2 -0
  9. testit_python_commons-3.2.5/src/testit_python_commons.egg-info/requires.txt +0 -2
  10. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/README.md +0 -0
  11. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/setup.cfg +0 -0
  12. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit.py +0 -0
  13. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/__init__.py +0 -0
  14. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/app_properties.py +0 -0
  15. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/client/__init__.py +0 -0
  16. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/client/client_configuration.py +0 -0
  17. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/decorators.py +0 -0
  18. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/dynamic_methods.py +0 -0
  19. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/models/__init__.py +0 -0
  20. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/models/adapter_mode.py +0 -0
  21. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/models/link.py +0 -0
  22. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/models/link_type.py +0 -0
  23. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/models/outcome_type.py +0 -0
  24. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/models/step_result.py +0 -0
  25. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/models/test_result.py +0 -0
  26. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/models/test_result_with_all_fixture_step_results_model.py +0 -0
  27. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/services/__init__.py +0 -0
  28. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/services/adapter_manager.py +0 -0
  29. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/services/adapter_manager_configuration.py +0 -0
  30. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/services/logger.py +0 -0
  31. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/services/plugin_manager.py +0 -0
  32. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/services/retry.py +0 -0
  33. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/services/step_manager.py +0 -0
  34. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons/services/step_result_storage.py +0 -0
  35. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons.egg-info/SOURCES.txt +0 -0
  36. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons.egg-info/dependency_links.txt +0 -0
  37. {testit_python_commons-3.2.5 → testit_python_commons-3.3.0}/src/testit_python_commons.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: testit-python-commons
3
- Version: 3.2.5
3
+ Version: 3.3.0
4
4
  Summary: Python commons for Test IT
5
5
  Home-page: https://github.com/testit-tms/adapters-python/
6
6
  Author: Integration team
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
17
  Description-Content-Type: text/markdown
18
18
  Requires-Dist: pluggy
19
- Requires-Dist: testit-api-client==4.0.0
19
+ Requires-Dist: testit-api-client==4.2.0
20
20
 
21
21
  # How to enable debug logging?
22
22
  1. Add in **connection_config.ini** file from the root directory of the project:
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
2
2
 
3
3
  setup(
4
4
  name='testit-python-commons',
5
- version='3.2.5',
5
+ version='3.3.0',
6
6
  description='Python commons for Test IT',
7
7
  long_description=open('README.md', "r").read(),
8
8
  long_description_content_type="text/markdown",
@@ -23,5 +23,5 @@ setup(
23
23
  py_modules=['testit', 'testit_python_commons'],
24
24
  packages=find_packages(where='src'),
25
25
  package_dir={'': 'src'},
26
- install_requires=['pluggy', 'testit-api-client==4.0.0']
26
+ install_requires=['pluggy', 'testit-api-client==4.2.0']
27
27
  )
@@ -8,7 +8,7 @@ from testit_api_client.apis import AttachmentsApi, AutoTestsApi, TestRunsApi, Te
8
8
  from testit_api_client.models import (
9
9
  AttachmentPutModel,
10
10
  TestResultModel,
11
- LinkAutoTestToWorkItemRequest
11
+ WorkItemIdModel
12
12
  )
13
13
 
14
14
  from testit_python_commons.client.client_configuration import ClientConfiguration
@@ -60,7 +60,7 @@ class ApiClientWorker:
60
60
  test_run_name
61
61
  )
62
62
 
63
- response = self.__test_run_api.create_empty(create_empty_request=model)
63
+ response = self.__test_run_api.create_empty(test_run_v2_post_short_model=model)
64
64
 
65
65
  return Converter.get_id_from_create_test_run_response(response)
66
66
 
@@ -127,7 +127,7 @@ class ApiClientWorker:
127
127
  test_result,
128
128
  self.__config.get_project_id())
129
129
 
130
- autotest_response = self.__autotest_api.create_auto_test(create_auto_test_request=model)
130
+ autotest_response = self.__autotest_api.create_auto_test(auto_test_post_model=model)
131
131
 
132
132
  logging.debug(f'Autotest "{test_result.get_autotest_name()}" was created')
133
133
 
@@ -142,7 +142,7 @@ class ApiClientWorker:
142
142
  self.__config.get_project_id())
143
143
  model.is_flaky = is_flaky
144
144
 
145
- self.__autotest_api.update_auto_test(update_auto_test_request=model)
145
+ self.__autotest_api.update_auto_test(auto_test_put_model=model)
146
146
 
147
147
  logging.debug(f'Autotest "{test_result.get_autotest_name()}" was updated')
148
148
 
@@ -160,7 +160,7 @@ class ApiClientWorker:
160
160
  def __link_test_to_work_item(self, autotest_global_id: str, work_item_id: str):
161
161
  self.__autotest_api.link_auto_test_to_work_item(
162
162
  autotest_global_id,
163
- link_auto_test_to_work_item_request=LinkAutoTestToWorkItemRequest(id=work_item_id))
163
+ work_item_id_model=WorkItemIdModel(id=work_item_id))
164
164
 
165
165
  logging.debug(f'Autotest was linked with workItem "{work_item_id}" by global id "{autotest_global_id}')
166
166
 
@@ -201,7 +201,7 @@ class ApiClientWorker:
201
201
  try:
202
202
  self.__test_results_api.api_v2_test_results_id_put(
203
203
  id=test_result.get_test_result_id(),
204
- api_v2_test_results_id_put_request=model)
204
+ test_result_update_v2_request=model)
205
205
  except Exception as exc:
206
206
  logging.error(f'Cannot update test result with id "{test_result.get_test_result_id()}" status: {exc}')
207
207
 
@@ -2,22 +2,22 @@ import typing
2
2
 
3
3
  from testit_api_client.models import (
4
4
  AttachmentPutModelAutoTestStepResultsModel,
5
- CreateAutoTestRequest,
6
- UpdateAutoTestRequest,
5
+ AutoTestPostModel,
6
+ AutoTestPutModel,
7
7
  AutoTestResultsForTestRunModel,
8
8
  AutoTestStepModel,
9
9
  AvailableTestResultOutcome,
10
10
  LinkPostModel,
11
11
  LinkPutModel,
12
12
  LinkType,
13
- CreateEmptyRequest,
13
+ TestRunV2PostShortModel,
14
14
  AutotestsSelectModelFilter,
15
15
  AutotestsSelectModelIncludes,
16
16
  ApiV2AutoTestsSearchPostRequest,
17
- ApiV2TestResultsIdPutRequest,
17
+ TestResultUpdateV2Request,
18
18
  TestResultModel,
19
19
  AttachmentModel,
20
- AttachmentPutModel
20
+ AttachmentUpdateRequest
21
21
  )
22
22
 
23
23
  from testit_python_commons.models.link import Link
@@ -31,7 +31,7 @@ class Converter:
31
31
  @classmethod
32
32
  @adapter_logger
33
33
  def test_run_to_test_run_short_model(cls, project_id, name):
34
- return CreateEmptyRequest(
34
+ return TestRunV2PostShortModel(
35
35
  project_id=project_id,
36
36
  name=name
37
37
  )
@@ -79,7 +79,7 @@ class Converter:
79
79
  cls,
80
80
  test_result: TestResult,
81
81
  project_id: str):
82
- return CreateAutoTestRequest(
82
+ return AutoTestPostModel(
83
83
  external_id=test_result.get_external_id(),
84
84
  project_id=project_id,
85
85
  name=test_result.get_autotest_name(),
@@ -105,7 +105,7 @@ class Converter:
105
105
  test_result: TestResult,
106
106
  project_id: str):
107
107
  if test_result.get_outcome() == 'Passed':
108
- return UpdateAutoTestRequest(
108
+ return AutoTestPutModel(
109
109
  external_id=test_result.get_external_id(),
110
110
  project_id=project_id,
111
111
  name=test_result.get_autotest_name(),
@@ -123,7 +123,7 @@ class Converter:
123
123
  labels=test_result.get_labels()
124
124
  )
125
125
  else:
126
- return UpdateAutoTestRequest(
126
+ return AutoTestPutModel(
127
127
  external_id=test_result.get_external_id(),
128
128
  project_id=project_id,
129
129
  name=test_result.get_autotest_name(),
@@ -173,8 +173,8 @@ class Converter:
173
173
  @adapter_logger
174
174
  def convert_test_result_model_to_test_results_id_put_request(
175
175
  cls,
176
- test_result: TestResultModel) -> ApiV2TestResultsIdPutRequest:
177
- return ApiV2TestResultsIdPutRequest(
176
+ test_result: TestResultModel) -> TestResultUpdateV2Request:
177
+ return TestResultUpdateV2Request(
178
178
  failure_class_ids=test_result.failure_class_ids,
179
179
  outcome=test_result.outcome,
180
180
  comment=test_result.comment,
@@ -192,8 +192,8 @@ class Converter:
192
192
  @adapter_logger
193
193
  def convert_test_result_with_all_setup_and_teardown_steps_to_test_results_id_put_request(
194
194
  cls,
195
- test_result: TestResultWithAllFixtureStepResults) -> ApiV2TestResultsIdPutRequest:
196
- return ApiV2TestResultsIdPutRequest(
195
+ test_result: TestResultWithAllFixtureStepResults) -> TestResultUpdateV2Request:
196
+ return TestResultUpdateV2Request(
197
197
  setup_results=cls.step_results_to_attachment_put_model_autotest_step_results_model(
198
198
  test_result.get_setup_results()),
199
199
  teardown_results=cls.step_results_to_attachment_put_model_autotest_step_results_model(
@@ -269,7 +269,7 @@ class Converter:
269
269
  @classmethod
270
270
  @adapter_logger
271
271
  def attachment_models_to_attachment_put_models(
272
- cls, attachments: typing.List[AttachmentModel]) -> typing.List[AttachmentPutModel]:
272
+ cls, attachments: typing.List[AttachmentModel]) -> typing.List[AttachmentUpdateRequest]:
273
273
  put_model_attachments = []
274
274
 
275
275
  for attachment in attachments:
@@ -281,8 +281,8 @@ class Converter:
281
281
 
282
282
  @staticmethod
283
283
  @adapter_logger
284
- def attachment_model_to_attachment_put_model(attachment: AttachmentModel) -> AttachmentPutModel:
285
- return AttachmentPutModel(id=attachment.id)
284
+ def attachment_model_to_attachment_put_model(attachment: AttachmentModel) -> AttachmentUpdateRequest:
285
+ return AttachmentUpdateRequest(id=attachment.id)
286
286
 
287
287
  @classmethod
288
288
  # @adapter_logger
@@ -69,6 +69,12 @@ class Utils:
69
69
 
70
70
  return parameters
71
71
 
72
+ @staticmethod
73
+ def exclude_self_parameter(all_parameters: dict) -> dict:
74
+ if all_parameters.get('self') is not None:
75
+ all_parameters.pop('self')
76
+ return all_parameters
77
+
72
78
  @staticmethod
73
79
  def collect_parameters_in_string_attribute(attribute: str, all_parameters: dict) -> str:
74
80
  param_keys = []
@@ -61,7 +61,9 @@ class StepContext:
61
61
  self.__step_result\
62
62
  .set_title(self.__title)\
63
63
  .set_description(self.__description)\
64
- .set_parameters(self.__parameters)
64
+ .set_parameters(
65
+ Utils.exclude_self_parameter(self.__parameters)
66
+ )
65
67
 
66
68
  logging.debug(f'Step "{self.__title}" was started')
67
69
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: testit-python-commons
3
- Version: 3.2.5
3
+ Version: 3.3.0
4
4
  Summary: Python commons for Test IT
5
5
  Home-page: https://github.com/testit-tms/adapters-python/
6
6
  Author: Integration team
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
17
  Description-Content-Type: text/markdown
18
18
  Requires-Dist: pluggy
19
- Requires-Dist: testit-api-client==4.0.0
19
+ Requires-Dist: testit-api-client==4.2.0
20
20
 
21
21
  # How to enable debug logging?
22
22
  1. Add in **connection_config.ini** file from the root directory of the project:
@@ -0,0 +1,2 @@
1
+ pluggy
2
+ testit-api-client==4.2.0
@@ -1,2 +0,0 @@
1
- pluggy
2
- testit-api-client==4.0.0