testit-python-commons 4.1.0__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.
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/PKG-INFO +1 -1
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/setup.py +1 -1
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/api/completion_api.py +5 -4
- testit_python_commons-4.1.1/src/api_client_syncstorage/model/completion_response.py +267 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/register_request.py +8 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/models/__init__.py +1 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/client/api_client.py +37 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/services/adapter_manager.py +5 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/services/sync_storage/sync_storage_runner.py +2 -2
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/utils/html_escape_utils.py +6 -1
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons.egg-info/PKG-INFO +1 -1
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons.egg-info/SOURCES.txt +1 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/tests/test_html_escape_utils.py +20 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/README.md +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/setup.cfg +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/__init__.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/api/__init__.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/api/health_api.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/api/system_api.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/api/test_results_api.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/api/workers_api.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/api_client.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/apis/__init__.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/configuration.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/exceptions.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/__init__.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/health_status_response.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/register_response.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/set_worker_status_request.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/set_worker_status_response.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/shutdown_response.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/test_result_cut_api_model.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model/test_result_save_response.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/model_utils.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/rest.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/__init__.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/app_properties.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/client/__init__.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/client/client_configuration.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/client/converter.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/client/helpers/__init__.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/client/helpers/bulk_autotest_helper.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/client/helpers/threads_manager.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/client/models/__init__.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/client/models/threads_for_create_and_result.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/client/models/threads_for_update_and_result.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/configurations/__init__.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/configurations/properties_names.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/decorators.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/dynamic_methods.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/models/__init__.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/models/adapter_mode.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/models/fixture.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/models/link.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/models/link_type.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/models/outcome_type.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/models/status_type.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/models/step_result.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/models/test_result.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/models/test_result_with_all_fixture_step_results_model.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/services/__init__.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/services/adapter_manager_configuration.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/services/fixture_manager.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/services/fixture_storage.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/services/logger.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/services/plugin_manager.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/services/retry.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/services/step_manager.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/services/step_result_storage.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/services/sync_storage/__init__.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/services/utils.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/step.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/utils/__init__.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons.egg-info/dependency_links.txt +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons.egg-info/requires.txt +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons.egg-info/top_level.txt +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/tests/test_app_properties.py +0 -0
- {testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/tests/test_dynamic_methods.py +0 -0
|
@@ -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': (
|
|
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': (
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
|
@@ -123,7 +123,12 @@ class HtmlEscapeUtils:
|
|
|
123
123
|
# Skip private/protected attributes and methods
|
|
124
124
|
if attr_name.startswith('_') or callable(getattr(obj, attr_name, None)):
|
|
125
125
|
continue
|
|
126
|
-
if
|
|
126
|
+
if (
|
|
127
|
+
attr_name.startswith("external_id")
|
|
128
|
+
or attr_name.startswith("externalId")
|
|
129
|
+
or attr_name.startswith("auto_test_external_id")
|
|
130
|
+
or attr_name.startswith("autoTestExternalId")
|
|
131
|
+
):
|
|
127
132
|
continue
|
|
128
133
|
|
|
129
134
|
try:
|
|
@@ -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
|
|
@@ -10,6 +10,15 @@ class SampleData:
|
|
|
10
10
|
self.tags = ["<tag>", "normal_tag"]
|
|
11
11
|
|
|
12
12
|
|
|
13
|
+
class SampleExternalIdsData:
|
|
14
|
+
def __init__(self):
|
|
15
|
+
self.external_id = "<test>"
|
|
16
|
+
self.externalId = "<test-camel>"
|
|
17
|
+
self.auto_test_external_id = "<auto-test>"
|
|
18
|
+
self.autoTestExternalId = "<auto-test-camel>"
|
|
19
|
+
self.description = "<script>alert('xss')</script>"
|
|
20
|
+
|
|
21
|
+
|
|
13
22
|
class TestHtmlEscapeUtils(unittest.TestCase):
|
|
14
23
|
|
|
15
24
|
def test_escape_html_tags_basic(self):
|
|
@@ -70,6 +79,17 @@ class TestHtmlEscapeUtils(unittest.TestCase):
|
|
|
70
79
|
self.assertEqual(result.tags[0], "<tag>") # Escaped
|
|
71
80
|
self.assertEqual(result.tags[1], "normal_tag") # No escaping needed
|
|
72
81
|
|
|
82
|
+
def test_escape_html_in_object_skips_external_id_fields(self):
|
|
83
|
+
"""Test that externalId fields are not escaped"""
|
|
84
|
+
test_obj = SampleExternalIdsData()
|
|
85
|
+
result = HtmlEscapeUtils.escape_html_in_object(test_obj)
|
|
86
|
+
|
|
87
|
+
self.assertEqual(result.external_id, "<test>")
|
|
88
|
+
self.assertEqual(result.externalId, "<test-camel>")
|
|
89
|
+
self.assertEqual(result.auto_test_external_id, "<auto-test>")
|
|
90
|
+
self.assertEqual(result.autoTestExternalId, "<auto-test-camel>")
|
|
91
|
+
self.assertEqual(result.description, "<script>alert('xss')</script>")
|
|
92
|
+
|
|
73
93
|
def test_escape_html_in_object_list(self):
|
|
74
94
|
"""Test HTML escaping in list of objects"""
|
|
75
95
|
test_list = [
|
|
File without changes
|
|
File without changes
|
{testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/api_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/api_client_syncstorage/rest.py
RENAMED
|
File without changes
|
|
File without changes
|
{testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/decorators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/models/link.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testit_python_commons-4.1.0 → testit_python_commons-4.1.1}/src/testit_python_commons/step.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|