testit-python-commons 3.2.4__tar.gz → 3.2.6__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-3.2.4 → testit_python_commons-3.2.6}/PKG-INFO +1 -1
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/setup.py +1 -1
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/services/adapter_manager.py +4 -2
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/services/utils.py +14 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/step.py +3 -1
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons.egg-info/PKG-INFO +1 -1
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/README.md +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/setup.cfg +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/__init__.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/app_properties.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/client/__init__.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/client/api_client.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/client/client_configuration.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/client/converter.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/decorators.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/dynamic_methods.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/models/__init__.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/models/adapter_mode.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/models/link.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/models/link_type.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/models/outcome_type.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/models/step_result.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/models/test_result.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/models/test_result_with_all_fixture_step_results_model.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/services/__init__.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/services/adapter_manager_configuration.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/services/logger.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/services/plugin_manager.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/services/retry.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/services/step_manager.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/services/step_result_storage.py +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons.egg-info/SOURCES.txt +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons.egg-info/dependency_links.txt +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons.egg-info/requires.txt +0 -0
- {testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons.egg-info/top_level.txt +0 -0
|
@@ -9,6 +9,7 @@ from testit_python_commons.models.test_result import TestResult
|
|
|
9
9
|
from testit_python_commons.models.test_result_with_all_fixture_step_results_model import TestResultWithAllFixtureStepResults
|
|
10
10
|
from testit_python_commons.services.adapter_manager_configuration import AdapterManagerConfiguration
|
|
11
11
|
from testit_python_commons.services.logger import adapter_logger
|
|
12
|
+
from testit_python_commons.services.utils import Utils
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class AdapterManager:
|
|
@@ -54,14 +55,15 @@ class AdapterManager:
|
|
|
54
55
|
return self.__api_client.load_attachments(attach_paths)
|
|
55
56
|
|
|
56
57
|
@adapter_logger
|
|
57
|
-
def create_attachment(self, body
|
|
58
|
+
def create_attachment(self, body, name: str):
|
|
58
59
|
if name is None:
|
|
59
60
|
name = str(uuid.uuid4()) + '-attachment.txt'
|
|
60
61
|
|
|
61
62
|
path = os.path.join(os.path.abspath(''), name)
|
|
62
63
|
|
|
63
64
|
with open(path, 'wb') as attached_file:
|
|
64
|
-
attached_file.write(
|
|
65
|
+
attached_file.write(
|
|
66
|
+
Utils.convert_body_of_attachment(body))
|
|
65
67
|
|
|
66
68
|
attachment_id = self.__api_client.load_attachments((path,))
|
|
67
69
|
|
|
@@ -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 = []
|
|
@@ -101,3 +107,11 @@ class Utils:
|
|
|
101
107
|
link_model.set_description(link_dict['description'])
|
|
102
108
|
|
|
103
109
|
return link_model
|
|
110
|
+
|
|
111
|
+
@staticmethod
|
|
112
|
+
@adapter_logger
|
|
113
|
+
def convert_body_of_attachment(body):
|
|
114
|
+
if isinstance(body, bytes):
|
|
115
|
+
return body
|
|
116
|
+
|
|
117
|
+
return str(body).encode('utf-8')
|
{testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/step.py
RENAMED
|
@@ -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(
|
|
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
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/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
|
{testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/src/testit_python_commons/decorators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testit_python_commons-3.2.4 → testit_python_commons-3.2.6}/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
|