testit-python-commons 4.1.0.post570__tar.gz → 4.1.1__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 (80) hide show
  1. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/PKG-INFO +2 -2
  2. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/setup.py +2 -2
  3. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/api/completion_api.py +5 -4
  4. testit_python_commons-4.1.1/src/api_client_syncstorage/model/completion_response.py +267 -0
  5. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/register_request.py +8 -0
  6. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/models/__init__.py +1 -0
  7. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/client/api_client.py +37 -0
  8. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/services/adapter_manager.py +5 -0
  9. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/services/sync_storage/sync_storage_runner.py +2 -2
  10. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons.egg-info/PKG-INFO +2 -2
  11. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons.egg-info/SOURCES.txt +1 -0
  12. testit_python_commons-4.1.1/src/testit_python_commons.egg-info/requires.txt +3 -0
  13. testit_python_commons-4.1.0.post570/src/testit_python_commons.egg-info/requires.txt +0 -3
  14. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/README.md +0 -0
  15. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/setup.cfg +0 -0
  16. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/__init__.py +0 -0
  17. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/api/__init__.py +0 -0
  18. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/api/health_api.py +0 -0
  19. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/api/system_api.py +0 -0
  20. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/api/test_results_api.py +0 -0
  21. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/api/workers_api.py +0 -0
  22. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/api_client.py +0 -0
  23. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/apis/__init__.py +0 -0
  24. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/configuration.py +0 -0
  25. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/exceptions.py +0 -0
  26. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/__init__.py +0 -0
  27. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/health_status_response.py +0 -0
  28. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/register_response.py +0 -0
  29. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/set_worker_status_request.py +0 -0
  30. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/set_worker_status_response.py +0 -0
  31. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/shutdown_response.py +0 -0
  32. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/test_result_cut_api_model.py +0 -0
  33. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/test_result_save_response.py +0 -0
  34. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model_utils.py +0 -0
  35. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/api_client_syncstorage/rest.py +0 -0
  36. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit.py +0 -0
  37. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/__init__.py +0 -0
  38. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/app_properties.py +0 -0
  39. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/client/__init__.py +0 -0
  40. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/client/client_configuration.py +0 -0
  41. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/client/converter.py +0 -0
  42. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/client/helpers/__init__.py +0 -0
  43. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/client/helpers/bulk_autotest_helper.py +0 -0
  44. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/client/helpers/threads_manager.py +0 -0
  45. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/client/models/__init__.py +0 -0
  46. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/client/models/threads_for_create_and_result.py +0 -0
  47. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/client/models/threads_for_update_and_result.py +0 -0
  48. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/configurations/__init__.py +0 -0
  49. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/configurations/properties_names.py +0 -0
  50. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/decorators.py +0 -0
  51. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/dynamic_methods.py +0 -0
  52. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/models/__init__.py +0 -0
  53. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/models/adapter_mode.py +0 -0
  54. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/models/fixture.py +0 -0
  55. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/models/link.py +0 -0
  56. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/models/link_type.py +0 -0
  57. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/models/outcome_type.py +0 -0
  58. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/models/status_type.py +0 -0
  59. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/models/step_result.py +0 -0
  60. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/models/test_result.py +0 -0
  61. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/models/test_result_with_all_fixture_step_results_model.py +0 -0
  62. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/services/__init__.py +0 -0
  63. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/services/adapter_manager_configuration.py +0 -0
  64. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/services/fixture_manager.py +0 -0
  65. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/services/fixture_storage.py +0 -0
  66. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/services/logger.py +0 -0
  67. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/services/plugin_manager.py +0 -0
  68. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/services/retry.py +0 -0
  69. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/services/step_manager.py +0 -0
  70. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/services/step_result_storage.py +0 -0
  71. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/services/sync_storage/__init__.py +0 -0
  72. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/services/utils.py +0 -0
  73. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/step.py +0 -0
  74. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/utils/__init__.py +0 -0
  75. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons/utils/html_escape_utils.py +0 -0
  76. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons.egg-info/dependency_links.txt +0 -0
  77. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/src/testit_python_commons.egg-info/top_level.txt +0 -0
  78. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/tests/test_app_properties.py +0 -0
  79. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/tests/test_dynamic_methods.py +0 -0
  80. {testit_python_commons-4.1.0.post570 → testit_python_commons-4.1.1}/tests/test_html_escape_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: testit-python-commons
3
- Version: 4.1.0.post570
3
+ Version: 4.1.1
4
4
  Summary: Python commons for Test IT
5
5
  Home-page: https://github.com/testit-tms/adapters-python/
6
6
  Author: Integration team
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.12
17
17
  Description-Content-Type: text/markdown
18
18
  Requires-Dist: pluggy
19
19
  Requires-Dist: tomli
20
- Requires-Dist: testit-api-client==7.5.5.post570
20
+ Requires-Dist: testit-api-client==7.5.5
21
21
  Dynamic: author
22
22
  Dynamic: author-email
23
23
  Dynamic: classifier
@@ -1,6 +1,6 @@
1
1
  from setuptools import find_packages, setup
2
2
 
3
- VERSION = "4.1.0.post570"
3
+ VERSION = "4.1.1"
4
4
 
5
5
  setup(
6
6
  name='testit-python-commons',
@@ -25,5 +25,5 @@ setup(
25
25
  py_modules=['testit', 'testit_python_commons'],
26
26
  packages=find_packages(where='src'),
27
27
  package_dir={'': 'src'},
28
- install_requires=['pluggy', 'tomli', 'testit-api-client==7.5.5.post570']
28
+ install_requires=['pluggy', 'tomli', 'testit-api-client==7.5.5']
29
29
  )
@@ -21,6 +21,7 @@ from api_client_syncstorage.model_utils import ( # noqa: F401
21
21
  none_type,
22
22
  validate_and_convert_types
23
23
  )
24
+ from api_client_syncstorage.model.completion_response import CompletionResponse
24
25
 
25
26
 
26
27
  class CompletionApi(object):
@@ -36,7 +37,7 @@ class CompletionApi(object):
36
37
  self.api_client = api_client
37
38
  self.force_completion_get_endpoint = _Endpoint(
38
39
  settings={
39
- 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,),
40
+ 'response_type': (CompletionResponse,),
40
41
  'auth': [],
41
42
  'endpoint_path': '/force-completion',
42
43
  'operation_id': 'force_completion_get',
@@ -85,7 +86,7 @@ class CompletionApi(object):
85
86
  )
86
87
  self.wait_completion_get_endpoint = _Endpoint(
87
88
  settings={
88
- 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,),
89
+ 'response_type': (CompletionResponse,),
89
90
  'auth': [],
90
91
  'endpoint_path': '/wait-completion',
91
92
  'operation_id': 'wait_completion_get',
@@ -183,7 +184,7 @@ class CompletionApi(object):
183
184
  async_req (bool): execute request asynchronously
184
185
 
185
186
  Returns:
186
- bool, date, datetime, dict, float, int, list, str, none_type
187
+ CompletionResponse
187
188
  If the method is called asynchronously, returns the request
188
189
  thread.
189
190
  """
@@ -266,7 +267,7 @@ class CompletionApi(object):
266
267
  async_req (bool): execute request asynchronously
267
268
 
268
269
  Returns:
269
- bool, date, datetime, dict, float, int, list, str, none_type
270
+ CompletionResponse
270
271
  If the method is called asynchronously, returns the request
271
272
  thread.
272
273
  """
@@ -0,0 +1,267 @@
1
+ """
2
+ Sync Storage Service API
3
+
4
+ This is a sync storage service for coordinating test workers. # noqa: E501
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Generated by: https://openapi-generator.tech
8
+ """
9
+
10
+
11
+ import re # noqa: F401
12
+ import sys # noqa: F401
13
+
14
+ from api_client_syncstorage.model_utils import ( # noqa: F401
15
+ ApiTypeError,
16
+ ModelComposed,
17
+ ModelNormal,
18
+ ModelSimple,
19
+ cached_property,
20
+ change_keys_js_to_python,
21
+ convert_js_args_to_python_args,
22
+ date,
23
+ datetime,
24
+ file_type,
25
+ none_type,
26
+ validate_get_composed_info,
27
+ OpenApiModel
28
+ )
29
+ from api_client_syncstorage.exceptions import ApiAttributeError
30
+
31
+
32
+
33
+ class CompletionResponse(ModelNormal):
34
+ """NOTE: This class is auto generated by OpenAPI Generator.
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+
39
+ Attributes:
40
+ allowed_values (dict): The key is the tuple path to the attribute
41
+ and the for var_name this is (var_name,). The value is a dict
42
+ with a capitalized key describing the allowed value and an allowed
43
+ value. These dicts store the allowed enum values.
44
+ attribute_map (dict): The key is attribute name
45
+ and the value is json key in definition.
46
+ discriminator_value_class_map (dict): A dict to go from the discriminator
47
+ variable value to the discriminator class name.
48
+ validations (dict): The key is the tuple path to the attribute
49
+ and the for var_name this is (var_name,). The value is a dict
50
+ that stores validations for max_length, min_length, max_items,
51
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
52
+ inclusive_minimum, and regex.
53
+ additional_properties_type (tuple): A tuple of classes accepted
54
+ as additional properties values.
55
+ """
56
+
57
+ allowed_values = {
58
+ }
59
+
60
+ validations = {
61
+ }
62
+
63
+ @cached_property
64
+ def additional_properties_type():
65
+ """
66
+ This must be a method because a model may have properties that are
67
+ of type self, this must run after the class is loaded
68
+ """
69
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
70
+
71
+ _nullable = False
72
+
73
+ @cached_property
74
+ def openapi_types():
75
+ """
76
+ This must be a method because a model may have properties that are
77
+ of type self, this must run after the class is loaded
78
+
79
+ Returns
80
+ openapi_types (dict): The key is attribute name
81
+ and the value is attribute type.
82
+ """
83
+ return {
84
+ 'completed': (bool,), # noqa: E501
85
+ 'message': (str,), # noqa: E501
86
+ }
87
+
88
+ @cached_property
89
+ def discriminator():
90
+ return None
91
+
92
+
93
+ attribute_map = {
94
+ 'completed': 'completed', # noqa: E501
95
+ 'message': 'message', # noqa: E501
96
+ }
97
+
98
+ read_only_vars = {
99
+ }
100
+
101
+ _composed_schemas = {}
102
+
103
+ @classmethod
104
+ @convert_js_args_to_python_args
105
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
106
+ """CompletionResponse - a model defined in OpenAPI
107
+
108
+ Keyword Args:
109
+ _check_type (bool): if True, values for parameters in openapi_types
110
+ will be type checked and a TypeError will be
111
+ raised if the wrong type is input.
112
+ Defaults to True
113
+ _path_to_item (tuple/list): This is a list of keys or values to
114
+ drill down to the model in received_data
115
+ when deserializing a response
116
+ _spec_property_naming (bool): True if the variable names in the input data
117
+ are serialized names, as specified in the OpenAPI document.
118
+ False if the variable names in the input data
119
+ are pythonic names, e.g. snake case (default)
120
+ _configuration (Configuration): the instance to use when
121
+ deserializing a file_type parameter.
122
+ If passed, type conversion is attempted
123
+ If omitted no type conversion is done.
124
+ _visited_composed_classes (tuple): This stores a tuple of
125
+ classes that we have traveled through so that
126
+ if we see that class again we will not use its
127
+ discriminator again.
128
+ When traveling through a discriminator, the
129
+ composed schema that is
130
+ is traveled through is added to this set.
131
+ For example if Animal has a discriminator
132
+ petType and we pass in "Dog", and the class Dog
133
+ allOf includes Animal, we move through Animal
134
+ once using the discriminator, and pick Dog.
135
+ Then in Dog, we will make an instance of the
136
+ Animal class but this time we won't travel
137
+ through its discriminator because we passed in
138
+ _visited_composed_classes = (Animal,)
139
+ completed (bool): [optional] # noqa: E501
140
+ message (str): [optional] # noqa: E501
141
+ """
142
+
143
+ _check_type = kwargs.pop('_check_type', True)
144
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
145
+ _path_to_item = kwargs.pop('_path_to_item', ())
146
+ _configuration = kwargs.pop('_configuration', None)
147
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
148
+
149
+ self = super(OpenApiModel, cls).__new__(cls)
150
+
151
+ if args:
152
+ for arg in args:
153
+ if isinstance(arg, dict):
154
+ kwargs.update(arg)
155
+ else:
156
+ raise ApiTypeError(
157
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
158
+ args,
159
+ self.__class__.__name__,
160
+ ),
161
+ path_to_item=_path_to_item,
162
+ valid_classes=(self.__class__,),
163
+ )
164
+
165
+ self._data_store = {}
166
+ self._check_type = _check_type
167
+ self._spec_property_naming = _spec_property_naming
168
+ self._path_to_item = _path_to_item
169
+ self._configuration = _configuration
170
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
171
+
172
+ for var_name, var_value in kwargs.items():
173
+ if var_name not in self.attribute_map and \
174
+ self._configuration is not None and \
175
+ self._configuration.discard_unknown_keys and \
176
+ self.additional_properties_type is None:
177
+ # discard variable.
178
+ continue
179
+ setattr(self, var_name, var_value)
180
+ return self
181
+
182
+ required_properties = set([
183
+ '_data_store',
184
+ '_check_type',
185
+ '_spec_property_naming',
186
+ '_path_to_item',
187
+ '_configuration',
188
+ '_visited_composed_classes',
189
+ ])
190
+
191
+ @convert_js_args_to_python_args
192
+ def __init__(self, *args, **kwargs): # noqa: E501
193
+ """CompletionResponse - a model defined in OpenAPI
194
+
195
+ Keyword Args:
196
+ _check_type (bool): if True, values for parameters in openapi_types
197
+ will be type checked and a TypeError will be
198
+ raised if the wrong type is input.
199
+ Defaults to True
200
+ _path_to_item (tuple/list): This is a list of keys or values to
201
+ drill down to the model in received_data
202
+ when deserializing a response
203
+ _spec_property_naming (bool): True if the variable names in the input data
204
+ are serialized names, as specified in the OpenAPI document.
205
+ False if the variable names in the input data
206
+ are pythonic names, e.g. snake case (default)
207
+ _configuration (Configuration): the instance to use when
208
+ deserializing a file_type parameter.
209
+ If passed, type conversion is attempted
210
+ If omitted no type conversion is done.
211
+ _visited_composed_classes (tuple): This stores a tuple of
212
+ classes that we have traveled through so that
213
+ if we see that class again we will not use its
214
+ discriminator again.
215
+ When traveling through a discriminator, the
216
+ composed schema that is
217
+ is traveled through is added to this set.
218
+ For example if Animal has a discriminator
219
+ petType and we pass in "Dog", and the class Dog
220
+ allOf includes Animal, we move through Animal
221
+ once using the discriminator, and pick Dog.
222
+ Then in Dog, we will make an instance of the
223
+ Animal class but this time we won't travel
224
+ through its discriminator because we passed in
225
+ _visited_composed_classes = (Animal,)
226
+ completed (bool): [optional] # noqa: E501
227
+ message (str): [optional] # noqa: E501
228
+ """
229
+
230
+ _check_type = kwargs.pop('_check_type', True)
231
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
232
+ _path_to_item = kwargs.pop('_path_to_item', ())
233
+ _configuration = kwargs.pop('_configuration', None)
234
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
235
+
236
+ if args:
237
+ for arg in args:
238
+ if isinstance(arg, dict):
239
+ kwargs.update(arg)
240
+ else:
241
+ raise ApiTypeError(
242
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
243
+ args,
244
+ self.__class__.__name__,
245
+ ),
246
+ path_to_item=_path_to_item,
247
+ valid_classes=(self.__class__,),
248
+ )
249
+
250
+ self._data_store = {}
251
+ self._check_type = _check_type
252
+ self._spec_property_naming = _spec_property_naming
253
+ self._path_to_item = _path_to_item
254
+ self._configuration = _configuration
255
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
256
+
257
+ for var_name, var_value in kwargs.items():
258
+ if var_name not in self.attribute_map and \
259
+ self._configuration is not None and \
260
+ self._configuration.discard_unknown_keys and \
261
+ self.additional_properties_type is None:
262
+ # discard variable.
263
+ continue
264
+ setattr(self, var_name, var_value)
265
+ if var_name in self.read_only_vars:
266
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
267
+ f"class with read only attributes.")
@@ -83,6 +83,8 @@ class RegisterRequest(ModelNormal):
83
83
  return {
84
84
  'pid': (str,), # noqa: E501
85
85
  'test_run_id': (str,), # noqa: E501
86
+ 'base_url': (str,), # noqa: E501
87
+ 'private_token': (str,), # noqa: E501
86
88
  }
87
89
 
88
90
  @cached_property
@@ -93,6 +95,8 @@ class RegisterRequest(ModelNormal):
93
95
  attribute_map = {
94
96
  'pid': 'pid', # noqa: E501
95
97
  'test_run_id': 'testRunId', # noqa: E501
98
+ 'base_url': 'baseUrl', # noqa: E501
99
+ 'private_token': 'privateToken', # noqa: E501
96
100
  }
97
101
 
98
102
  read_only_vars = {
@@ -138,6 +142,8 @@ class RegisterRequest(ModelNormal):
138
142
  _visited_composed_classes = (Animal,)
139
143
  pid (str): [optional] # noqa: E501
140
144
  test_run_id (str): [optional] # noqa: E501
145
+ base_url (str): [optional] # noqa: E501
146
+ private_token (str): [optional] # noqa: E501
141
147
  """
142
148
 
143
149
  _check_type = kwargs.pop('_check_type', True)
@@ -225,6 +231,8 @@ class RegisterRequest(ModelNormal):
225
231
  _visited_composed_classes = (Animal,)
226
232
  pid (str): [optional] # noqa: E501
227
233
  test_run_id (str): [optional] # noqa: E501
234
+ base_url (str): [optional] # noqa: E501
235
+ private_token (str): [optional] # noqa: E501
228
236
  """
229
237
 
230
238
  _check_type = kwargs.pop('_check_type', True)
@@ -9,6 +9,7 @@
9
9
  # import sys
10
10
  # sys.setrecursionlimit(n)
11
11
 
12
+ from api_client_syncstorage.model.completion_response import CompletionResponse
12
13
  from api_client_syncstorage.model.health_status_response import HealthStatusResponse
13
14
  from api_client_syncstorage.model.register_request import RegisterRequest
14
15
  from api_client_syncstorage.model.register_response import RegisterResponse
@@ -170,14 +170,29 @@ class ApiClientWorker:
170
170
  test_result.get_external_id())
171
171
 
172
172
  autotests = self.__autotest_api.api_v2_auto_tests_search_post(api_v2_auto_tests_search_post_request=model)
173
+ should_create_work_item = test_result.get_automatic_creation_test_cases()
173
174
 
174
175
  if autotests:
176
+ logging.info(
177
+ 'Autotest "%s" already exists (external_id="%s"), using update path. '
178
+ "automaticCreationTestCases=%s applies only on create path.",
179
+ test_result.get_autotest_name(),
180
+ test_result.get_external_id(),
181
+ should_create_work_item,
182
+ )
175
183
  self.__update_auto_test(test_result, autotests[0])
176
184
 
177
185
  autotest_id = autotests[0].id
178
186
 
179
187
  self.__update_autotest_link_from_work_items(autotest_id, test_result.get_work_item_ids())
180
188
  else:
189
+ logging.info(
190
+ 'Autotest "%s" not found (external_id="%s"), using create path with '
191
+ "automaticCreationTestCases=%s.",
192
+ test_result.get_autotest_name(),
193
+ test_result.get_external_id(),
194
+ should_create_work_item,
195
+ )
181
196
  self.__create_auto_test(test_result)
182
197
 
183
198
  return self.__load_test_result(test_result)
@@ -186,9 +201,12 @@ class ApiClientWorker:
186
201
  def write_tests(self, test_results: List[TestResult], fixture_containers: dict) -> None:
187
202
  logging.debug("call __write_tests")
188
203
  bulk_autotest_helper = BulkAutotestHelper(self.__autotest_api, self.__test_run_api, self.__config)
204
+ create_count = 0
205
+ update_count = 0
189
206
 
190
207
  for test_result in test_results:
191
208
  test_result = self.__add_fixtures_to_test_result(test_result, fixture_containers)
209
+ should_create_work_item = test_result.get_automatic_creation_test_cases()
192
210
 
193
211
  test_result_model = Converter.test_result_to_testrun_result_post_model(
194
212
  test_result,
@@ -201,6 +219,13 @@ class ApiClientWorker:
201
219
  autotests = self.__get_autotests_by_external_id(test_result.get_external_id())
202
220
 
203
221
  if autotests:
222
+ update_count += 1
223
+ logging.debug(
224
+ 'Bulk update path for external_id="%s", automaticCreationTestCases=%s '
225
+ "(manual work item auto-creation is create-path behavior).",
226
+ test_result.get_external_id(),
227
+ should_create_work_item,
228
+ )
204
229
  autotest_links_to_wi_for_update = {}
205
230
  autotest_for_update = Converter.prepare_to_mass_update_autotest(
206
231
  test_result,
@@ -215,6 +240,12 @@ class ApiClientWorker:
215
240
  test_result_model,
216
241
  autotest_links_to_wi_for_update)
217
242
  else:
243
+ create_count += 1
244
+ logging.debug(
245
+ 'Bulk create path for external_id="%s", automaticCreationTestCases=%s.',
246
+ test_result.get_external_id(),
247
+ should_create_work_item,
248
+ )
218
249
  autotest_for_create = Converter.prepare_to_mass_create_autotest(
219
250
  test_result,
220
251
  self.__config.get_project_id(),
@@ -222,6 +253,12 @@ class ApiClientWorker:
222
253
 
223
254
  bulk_autotest_helper.add_for_create(autotest_for_create, test_result_model)
224
255
 
256
+ logging.info(
257
+ "Bulk write summary: create=%d, update=%d, total=%d",
258
+ create_count,
259
+ update_count,
260
+ len(test_results),
261
+ )
225
262
  bulk_autotest_helper.teardown()
226
263
 
227
264
  @staticmethod
@@ -247,6 +247,11 @@ class AdapterManager:
247
247
 
248
248
  fixtures = self.__fixture_manager.get_all_items()
249
249
 
250
+ # Ensure this option is propagated for each buffered test result in bulk mode.
251
+ should_create_work_item = self.__config.should_automatic_creation_test_cases()
252
+ for test_result in self.__test_results:
253
+ test_result.set_automatic_creation_test_cases(should_create_work_item)
254
+
250
255
  self.__api_client.write_tests(self.__test_results, fixtures)
251
256
 
252
257
  @adapter_logger
@@ -39,7 +39,7 @@ class SyncStorageRunner:
39
39
  across multiple workers.
40
40
  """
41
41
 
42
- SYNC_STORAGE_VERSION = "v0.2.0-tms-5.7"
42
+ SYNC_STORAGE_VERSION = "v0.2.3"
43
43
  SYNC_STORAGE_REPO_URL = (
44
44
  "https://github.com/testit-tms/sync-storage-public/releases/download/"
45
45
  )
@@ -490,7 +490,7 @@ class SyncStorageRunner:
490
490
  # Create registration request
491
491
 
492
492
  register_request = RegisterRequest(
493
- pid=self.worker_pid, test_run_id=self.test_run_id
493
+ pid=self.worker_pid, test_run_id=self.test_run_id, base_url=self.base_url, private_token=self.private_token
494
494
  )
495
495
 
496
496
  # Send registration request
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: testit-python-commons
3
- Version: 4.1.0.post570
3
+ Version: 4.1.1
4
4
  Summary: Python commons for Test IT
5
5
  Home-page: https://github.com/testit-tms/adapters-python/
6
6
  Author: Integration team
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.12
17
17
  Description-Content-Type: text/markdown
18
18
  Requires-Dist: pluggy
19
19
  Requires-Dist: tomli
20
- Requires-Dist: testit-api-client==7.5.5.post570
20
+ Requires-Dist: testit-api-client==7.5.5
21
21
  Dynamic: author
22
22
  Dynamic: author-email
23
23
  Dynamic: classifier
@@ -15,6 +15,7 @@ src/api_client_syncstorage/api/test_results_api.py
15
15
  src/api_client_syncstorage/api/workers_api.py
16
16
  src/api_client_syncstorage/apis/__init__.py
17
17
  src/api_client_syncstorage/model/__init__.py
18
+ src/api_client_syncstorage/model/completion_response.py
18
19
  src/api_client_syncstorage/model/health_status_response.py
19
20
  src/api_client_syncstorage/model/register_request.py
20
21
  src/api_client_syncstorage/model/register_response.py
@@ -0,0 +1,3 @@
1
+ pluggy
2
+ tomli
3
+ testit-api-client==7.5.5
@@ -1,3 +0,0 @@
1
- pluggy
2
- tomli
3
- testit-api-client==7.5.5.post570