testit-cli 2.2.2.post522__tar.gz → 2.3.0.post523__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_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/PKG-INFO +12 -11
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/README.md +10 -9
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/setup.py +2 -2
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/apiclient.py +21 -21
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/converter.py +38 -81
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli.egg-info/PKG-INFO +12 -11
- testit_cli-2.3.0.post523/src/testit_cli.egg-info/requires.txt +4 -0
- testit_cli-2.2.2.post522/src/testit_cli.egg-info/requires.txt +0 -4
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/LICENSE +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/setup.cfg +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/__init__.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/__main__.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/autotests_filter.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/click_commands.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/dir_worker.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/file_worker.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/filter_factory.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/importer.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/logger.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/models/__init__.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/models/config.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/models/mode.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/models/status.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/models/testcase.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/models/testrun.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/parser.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/service.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/service_factory.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli/validation.py +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli.egg-info/SOURCES.txt +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli.egg-info/dependency_links.txt +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli.egg-info/entry_points.txt +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli.egg-info/top_level.txt +0 -0
- {testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/tests/test_click.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: testit-cli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0.post523
|
|
4
4
|
Summary: This tool is the command line wrapper of Test IT allowing you to upload the test results in real time to Test IT
|
|
5
5
|
Home-page: https://pypi.org/project/testit-cli/
|
|
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
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: testit-api-client==5.
|
|
19
|
+
Requires-Dist: testit-api-client==5.0.0
|
|
20
20
|
Requires-Dist: validators
|
|
21
21
|
Requires-Dist: tqdm
|
|
22
22
|
Requires-Dist: click~=8.0.4
|
|
@@ -41,12 +41,13 @@ You can see more information in [official documentation](https://docs.testit.sof
|
|
|
41
41
|
|
|
42
42
|
## Compatibility
|
|
43
43
|
|
|
44
|
-
| Test IT | Test IT CLI
|
|
45
|
-
|
|
46
|
-
| 3.5+ | 0.1
|
|
47
|
-
| 4.4 | 1.0
|
|
48
|
-
| 4.5 | 1.2
|
|
49
|
-
| 4.6 | 1.5
|
|
50
|
-
| 5.0 | 2.0
|
|
51
|
-
| 5.2 | 2.1
|
|
52
|
-
| 5.2.2 | 2.2.1.post522
|
|
44
|
+
| Test IT | Test IT CLI |
|
|
45
|
+
|---------|---------------|
|
|
46
|
+
| 3.5+ | 0.1 |
|
|
47
|
+
| 4.4 | 1.0 |
|
|
48
|
+
| 4.5 | 1.2 |
|
|
49
|
+
| 4.6 | 1.5 |
|
|
50
|
+
| 5.0 | 2.0 |
|
|
51
|
+
| 5.2 | 2.1 |
|
|
52
|
+
| 5.2.2 | 2.2.1.post522 |
|
|
53
|
+
| 5.2.3 | 2.3.0.post523 |
|
|
@@ -9,12 +9,13 @@ You can see more information in [official documentation](https://docs.testit.sof
|
|
|
9
9
|
|
|
10
10
|
## Compatibility
|
|
11
11
|
|
|
12
|
-
| Test IT | Test IT CLI
|
|
13
|
-
|
|
14
|
-
| 3.5+ | 0.1
|
|
15
|
-
| 4.4 | 1.0
|
|
16
|
-
| 4.5 | 1.2
|
|
17
|
-
| 4.6 | 1.5
|
|
18
|
-
| 5.0 | 2.0
|
|
19
|
-
| 5.2 | 2.1
|
|
20
|
-
| 5.2.2 | 2.2.1.post522
|
|
12
|
+
| Test IT | Test IT CLI |
|
|
13
|
+
|---------|---------------|
|
|
14
|
+
| 3.5+ | 0.1 |
|
|
15
|
+
| 4.4 | 1.0 |
|
|
16
|
+
| 4.5 | 1.2 |
|
|
17
|
+
| 4.6 | 1.5 |
|
|
18
|
+
| 5.0 | 2.0 |
|
|
19
|
+
| 5.2 | 2.1 |
|
|
20
|
+
| 5.2.2 | 2.2.1.post522 |
|
|
21
|
+
| 5.2.3 | 2.3.0.post523 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from setuptools import find_packages, setup
|
|
2
2
|
|
|
3
|
-
VERSION = "2.
|
|
3
|
+
VERSION = "2.3.0.post523"
|
|
4
4
|
|
|
5
5
|
setup(
|
|
6
6
|
name='testit-cli',
|
|
@@ -26,7 +26,7 @@ setup(
|
|
|
26
26
|
py_modules=['testit_cli'],
|
|
27
27
|
packages=find_packages(where='src'),
|
|
28
28
|
package_dir={'': 'src'},
|
|
29
|
-
install_requires=['testit-api-client==5.
|
|
29
|
+
install_requires=['testit-api-client==5.0.0', 'validators', 'tqdm', 'click~=8.0.4'],
|
|
30
30
|
entry_points={
|
|
31
31
|
'console_scripts': [
|
|
32
32
|
'testit = testit_cli.__main__:console_main'
|
|
@@ -3,11 +3,10 @@ import logging
|
|
|
3
3
|
import os
|
|
4
4
|
import typing
|
|
5
5
|
|
|
6
|
-
from testit_api_client import ApiClient as TmsClient
|
|
7
|
-
AutoTestApiResult, UpdateEmptyTestRunApiModel
|
|
6
|
+
from testit_api_client import ApiClient as TmsClient
|
|
8
7
|
from testit_api_client import Configuration
|
|
9
8
|
from testit_api_client.api import AttachmentsApi, AutoTestsApi, TestRunsApi, TestResultsApi
|
|
10
|
-
from testit_api_client.models import AttachmentPutModel
|
|
9
|
+
from testit_api_client.models import AttachmentPutModel, TestRunV2PostShortModel, TestResultShortResponse
|
|
11
10
|
|
|
12
11
|
from .converter import Converter
|
|
13
12
|
from .models.testrun import TestRun
|
|
@@ -33,22 +32,22 @@ class ApiClient:
|
|
|
33
32
|
|
|
34
33
|
def create_test_run(self, project_id: str, name: str) -> TestRun:
|
|
35
34
|
"""Function creates test run and returns test run id."""
|
|
36
|
-
model =
|
|
35
|
+
model = TestRunV2PostShortModel(project_id=project_id, name=name)
|
|
37
36
|
logging.debug(f"Creating test run with model: {model}")
|
|
38
37
|
|
|
39
|
-
test_run = self.__test_run_api.create_empty(model)
|
|
38
|
+
test_run = self.__test_run_api.create_empty(test_run_v2_post_short_model=model)
|
|
40
39
|
|
|
41
40
|
logging.info(f'Created new testrun (ID: {test_run.id})')
|
|
42
41
|
logging.debug(f"Test run created: {test_run}")
|
|
43
42
|
|
|
44
|
-
return Converter.
|
|
43
|
+
return Converter.test_run_v2_get_model_to_test_run(test_run)
|
|
45
44
|
|
|
46
45
|
def update_test_run(self, test_run: TestRun):
|
|
47
46
|
"""Function updates test run."""
|
|
48
|
-
model
|
|
47
|
+
model = Converter.test_run_to_update_empty_request(test_run)
|
|
49
48
|
logging.debug(f"Updating test run with model: {model}")
|
|
50
49
|
|
|
51
|
-
self.__test_run_api.update_empty(model)
|
|
50
|
+
self.__test_run_api.update_empty(test_run_v2_put_model=model)
|
|
52
51
|
|
|
53
52
|
logging.info(f'Updated testrun (ID: {test_run.id})')
|
|
54
53
|
|
|
@@ -62,23 +61,22 @@ class ApiClient:
|
|
|
62
61
|
|
|
63
62
|
logging.info(f"Completed testrun (ID: {test_run_id})")
|
|
64
63
|
|
|
65
|
-
def get_test_run(self, test_run_id: str) -> Converter.
|
|
64
|
+
def get_test_run(self, test_run_id: str) -> Converter.test_run_v2_get_model_to_test_run:
|
|
66
65
|
"""Function gets test run and returns test run."""
|
|
67
66
|
logging.debug(f"Getting test run {test_run_id}")
|
|
68
67
|
|
|
69
68
|
test_run = self.__test_run_api.get_test_run_by_id(test_run_id)
|
|
70
69
|
if test_run is not None:
|
|
71
70
|
logging.debug(f"Got testrun (ID: {test_run_id})")
|
|
72
|
-
return Converter.
|
|
71
|
+
return Converter.test_run_v2_get_model_to_test_run(test_run)
|
|
73
72
|
|
|
74
73
|
logging.error(f"Test run {test_run_id} not found!")
|
|
75
74
|
|
|
76
|
-
def get_autotests(self, model: Converter.project_id_and_external_id_to_autotests_search_post_request)
|
|
77
|
-
-> list[AutoTestApiResult]:
|
|
75
|
+
def get_autotests(self, model: Converter.project_id_and_external_id_to_autotests_search_post_request):
|
|
78
76
|
"""Function returns list of AutoTestModel."""
|
|
79
77
|
logging.debug(f"Getting autotests: {model}")
|
|
80
78
|
|
|
81
|
-
autotests
|
|
79
|
+
autotests = self.__autotest_api.api_v2_auto_tests_search_post(autotests_select_model=model)
|
|
82
80
|
|
|
83
81
|
logging.debug(f"Got autotests: {autotests}")
|
|
84
82
|
|
|
@@ -88,7 +86,7 @@ class ApiClient:
|
|
|
88
86
|
"""Function creates autotest and returns autotest id."""
|
|
89
87
|
logging.debug(f"Creating autotest {model}")
|
|
90
88
|
|
|
91
|
-
response = self.__autotest_api.create_auto_test(model)
|
|
89
|
+
response = self.__autotest_api.create_auto_test(auto_test_post_model=model)
|
|
92
90
|
|
|
93
91
|
logging.debug(f"Created autotest {response}")
|
|
94
92
|
|
|
@@ -99,7 +97,7 @@ class ApiClient:
|
|
|
99
97
|
try:
|
|
100
98
|
logging.debug(f"Updating autotest {model}")
|
|
101
99
|
|
|
102
|
-
self.__autotest_api.update_auto_test(model)
|
|
100
|
+
self.__autotest_api.update_auto_test(auto_test_put_model=model)
|
|
103
101
|
|
|
104
102
|
logging.debug(f'Updated "{model.name}" successfully!')
|
|
105
103
|
except Exception as exc:
|
|
@@ -113,7 +111,7 @@ class ApiClient:
|
|
|
113
111
|
logging.debug(f"Adding autotest results to testrun {testrun_id}: {model}")
|
|
114
112
|
|
|
115
113
|
self.__test_run_api.set_auto_test_results_for_test_run(
|
|
116
|
-
testrun_id, [model]
|
|
114
|
+
id=testrun_id, auto_test_results_for_test_run_model=[model]
|
|
117
115
|
)
|
|
118
116
|
logging.debug(
|
|
119
117
|
f"Added autotest results to testrun {testrun_id} successfully"
|
|
@@ -129,7 +127,8 @@ class ApiClient:
|
|
|
129
127
|
if os.path.isfile(attachment):
|
|
130
128
|
with open(attachment, "rb+") as file:
|
|
131
129
|
try:
|
|
132
|
-
attachment_response = self.__attachments_api.api_v2_attachments_post(
|
|
130
|
+
attachment_response = self.__attachments_api.api_v2_attachments_post(
|
|
131
|
+
file=(file.name, file.read()))
|
|
133
132
|
|
|
134
133
|
attachment_ids.append(AttachmentPutModel(id=attachment_response.id))
|
|
135
134
|
|
|
@@ -143,12 +142,13 @@ class ApiClient:
|
|
|
143
142
|
|
|
144
143
|
def get_test_results(
|
|
145
144
|
self,
|
|
146
|
-
model: Converter.testrun_id_and_configuration_id_and_in_progress_outcome_to_test_results_search_post_request
|
|
147
|
-
|
|
148
|
-
"""Function returns list of
|
|
145
|
+
model: Converter.testrun_id_and_configuration_id_and_in_progress_outcome_to_test_results_search_post_request
|
|
146
|
+
) -> typing.List[TestResultShortResponse]:
|
|
147
|
+
"""Function returns list of TestResultShortGetModel."""
|
|
149
148
|
logging.debug(f"Getting test results: {model}")
|
|
150
149
|
|
|
151
|
-
test_results = self.__test_results_api.api_v2_test_results_search_post(
|
|
150
|
+
test_results = self.__test_results_api.api_v2_test_results_search_post(
|
|
151
|
+
test_results_filter_request=model)
|
|
152
152
|
|
|
153
153
|
logging.debug(f"Got test results: {test_results}")
|
|
154
154
|
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import typing
|
|
2
2
|
|
|
3
|
-
from testit_api_client import AutoTestSearchApiModel, AutoTestFilterApiModel, AutoTestSearchIncludeApiModel, \
|
|
4
|
-
TestResultsFilterApiModel, TestRunV2ApiResult, AttachmentApiResult, LinkApiResult, UpdateEmptyTestRunApiModel, \
|
|
5
|
-
AssignAttachmentApiModel
|
|
6
3
|
from testit_api_client.models import (
|
|
4
|
+
AutotestFilterModel,
|
|
5
|
+
SearchAutoTestsQueryIncludesModel,
|
|
7
6
|
AutoTestResultsForTestRunModel,
|
|
7
|
+
AutotestsSelectModel,
|
|
8
8
|
AttachmentModel,
|
|
9
9
|
AttachmentPutModel,
|
|
10
10
|
AutoTestPostModel,
|
|
11
11
|
AutoTestPutModel,
|
|
12
12
|
LinkModel,
|
|
13
13
|
LinkPutModel,
|
|
14
|
+
TestRunV2GetModel,
|
|
15
|
+
TestRunV2PutModel,
|
|
16
|
+
TestResultsFilterRequest,
|
|
14
17
|
TestResultOutcome,
|
|
15
18
|
TestResultShortResponse,
|
|
16
19
|
AutoTestModel
|
|
@@ -21,43 +24,43 @@ from .models.testrun import TestRun
|
|
|
21
24
|
|
|
22
25
|
class Converter:
|
|
23
26
|
@staticmethod
|
|
24
|
-
def project_id_and_external_id_to_autotests_search_post_request(
|
|
25
|
-
->
|
|
26
|
-
autotests_filter =
|
|
27
|
+
def project_id_and_external_id_to_autotests_search_post_request(
|
|
28
|
+
project_id: str, external_id: str) -> AutotestsSelectModel:
|
|
29
|
+
autotests_filter = AutotestFilterModel(
|
|
27
30
|
project_ids=[project_id],
|
|
28
31
|
external_ids=[external_id],
|
|
29
32
|
is_deleted=False)
|
|
30
|
-
autotests_includes =
|
|
33
|
+
autotests_includes = SearchAutoTestsQueryIncludesModel(
|
|
31
34
|
include_steps=False,
|
|
32
35
|
include_links=False,
|
|
33
36
|
include_labels=False)
|
|
34
37
|
|
|
35
|
-
return
|
|
38
|
+
return AutotestsSelectModel(filter=autotests_filter, includes=autotests_includes)
|
|
36
39
|
|
|
37
40
|
@staticmethod
|
|
38
|
-
def autotest_ids_to_autotests_search_post_request(
|
|
39
|
-
->
|
|
40
|
-
autotests_filter =
|
|
41
|
+
def autotest_ids_to_autotests_search_post_request(
|
|
42
|
+
autotest_ids: typing.List[int]) -> AutotestsSelectModel:
|
|
43
|
+
autotests_filter = AutotestFilterModel(
|
|
41
44
|
global_ids=autotest_ids)
|
|
42
|
-
autotests_includes =
|
|
45
|
+
autotests_includes = SearchAutoTestsQueryIncludesModel(
|
|
43
46
|
include_steps=False,
|
|
44
47
|
include_links=False,
|
|
45
48
|
include_labels=False)
|
|
46
49
|
|
|
47
|
-
return
|
|
50
|
+
return AutotestsSelectModel(filter=autotests_filter, includes=autotests_includes)
|
|
48
51
|
|
|
49
52
|
@staticmethod
|
|
50
53
|
def testrun_id_and_configuration_id_and_in_progress_outcome_to_test_results_search_post_request(
|
|
51
54
|
testrun_id: str,
|
|
52
|
-
configuration_id: str) ->
|
|
53
|
-
return
|
|
55
|
+
configuration_id: str) -> TestResultsFilterRequest:
|
|
56
|
+
return TestResultsFilterRequest(
|
|
54
57
|
test_run_ids=[testrun_id],
|
|
55
58
|
configuration_ids=[configuration_id],
|
|
56
59
|
outcomes=[TestResultOutcome("InProgress")])
|
|
57
60
|
|
|
58
61
|
@staticmethod
|
|
59
|
-
def test_result_short_get_models_to_autotest_ids(
|
|
60
|
-
->
|
|
62
|
+
def test_result_short_get_models_to_autotest_ids(
|
|
63
|
+
test_results: typing.List[TestResultShortResponse]) -> typing.List[int]:
|
|
61
64
|
autotest_ids = []
|
|
62
65
|
|
|
63
66
|
for test_result in test_results:
|
|
@@ -66,8 +69,8 @@ class Converter:
|
|
|
66
69
|
return autotest_ids
|
|
67
70
|
|
|
68
71
|
@staticmethod
|
|
69
|
-
def autotest_models_to_external_keys(
|
|
70
|
-
->
|
|
72
|
+
def autotest_models_to_external_keys(
|
|
73
|
+
autotests: typing.List[AutoTestModel]) -> typing.List[str]:
|
|
71
74
|
external_keys = []
|
|
72
75
|
|
|
73
76
|
for autotest in autotests:
|
|
@@ -81,8 +84,8 @@ class Converter:
|
|
|
81
84
|
return external_keys
|
|
82
85
|
|
|
83
86
|
@staticmethod
|
|
84
|
-
def test_result_to_create_autotest_request(
|
|
85
|
-
-> AutoTestPostModel:
|
|
87
|
+
def test_result_to_create_autotest_request(
|
|
88
|
+
result, external_id: str, project_id: str) -> AutoTestPostModel:
|
|
86
89
|
return AutoTestPostModel(
|
|
87
90
|
external_id=external_id,
|
|
88
91
|
project_id=project_id,
|
|
@@ -92,8 +95,8 @@ class Converter:
|
|
|
92
95
|
)
|
|
93
96
|
|
|
94
97
|
@staticmethod
|
|
95
|
-
def test_result_to_update_autotest_request(
|
|
96
|
-
-> AutoTestPutModel:
|
|
98
|
+
def test_result_to_update_autotest_request(
|
|
99
|
+
result, external_id: str, project_id: str) -> AutoTestPutModel:
|
|
97
100
|
return AutoTestPutModel(
|
|
98
101
|
external_id=external_id,
|
|
99
102
|
project_id=project_id,
|
|
@@ -117,16 +120,16 @@ class Converter:
|
|
|
117
120
|
)
|
|
118
121
|
|
|
119
122
|
@classmethod
|
|
120
|
-
def
|
|
123
|
+
def test_run_v2_get_model_to_test_run(cls, test_run_model: TestRunV2GetModel) -> TestRun:
|
|
121
124
|
return TestRun(
|
|
122
|
-
id=
|
|
123
|
-
project_id=
|
|
124
|
-
state=
|
|
125
|
-
name=
|
|
126
|
-
description=
|
|
127
|
-
launch_source=
|
|
128
|
-
attachments=cls.
|
|
129
|
-
links=cls.
|
|
125
|
+
id=test_run_model.id,
|
|
126
|
+
project_id=test_run_model.project_id,
|
|
127
|
+
state=test_run_model.state_name.value,
|
|
128
|
+
name=test_run_model.name,
|
|
129
|
+
description=test_run_model.description,
|
|
130
|
+
launch_source=test_run_model.launch_source,
|
|
131
|
+
attachments=cls.attachment_models_to_attachment_put_models(test_run_model.attachments),
|
|
132
|
+
links=cls.link_models_to_link_put_models(test_run_model.links)
|
|
130
133
|
)
|
|
131
134
|
|
|
132
135
|
@classmethod
|
|
@@ -141,26 +144,10 @@ class Converter:
|
|
|
141
144
|
|
|
142
145
|
return attachment_put_models
|
|
143
146
|
|
|
144
|
-
@classmethod
|
|
145
|
-
def attachment_results_to_attachment_put_models(
|
|
146
|
-
cls,
|
|
147
|
-
attachment_results: typing.List[AttachmentApiResult]) -> typing.List[AttachmentPutModel]:
|
|
148
|
-
attachment_put_models = []
|
|
149
|
-
|
|
150
|
-
for attachment_result in attachment_results:
|
|
151
|
-
attachment_put_models.append(
|
|
152
|
-
cls.attachment_result_to_attachment_put_model(attachment_result))
|
|
153
|
-
|
|
154
|
-
return attachment_put_models
|
|
155
|
-
|
|
156
147
|
@staticmethod
|
|
157
148
|
def attachment_model_to_attachment_put_model(attachment_model: AttachmentModel) -> AttachmentPutModel:
|
|
158
149
|
return AttachmentPutModel(id=attachment_model.id)
|
|
159
150
|
|
|
160
|
-
@staticmethod
|
|
161
|
-
def attachment_result_to_attachment_put_model(attachment_result: AttachmentApiResult) -> AttachmentPutModel:
|
|
162
|
-
return AttachmentPutModel(id=attachment_result.id)
|
|
163
|
-
|
|
164
151
|
@classmethod
|
|
165
152
|
def link_models_to_link_put_models(
|
|
166
153
|
cls,
|
|
@@ -173,18 +160,6 @@ class Converter:
|
|
|
173
160
|
|
|
174
161
|
return link_put_models
|
|
175
162
|
|
|
176
|
-
@classmethod
|
|
177
|
-
def link_results_to_link_put_models(
|
|
178
|
-
cls,
|
|
179
|
-
link_results: typing.List[LinkApiResult]) -> typing.List[LinkPutModel]:
|
|
180
|
-
link_put_models = []
|
|
181
|
-
|
|
182
|
-
for link_result in link_results:
|
|
183
|
-
link_put_models.append(
|
|
184
|
-
cls.link_result_to_link_put_model(link_result))
|
|
185
|
-
|
|
186
|
-
return link_put_models
|
|
187
|
-
|
|
188
163
|
@staticmethod
|
|
189
164
|
def link_model_to_link_put_model(link_model: LinkModel) -> LinkPutModel:
|
|
190
165
|
return LinkPutModel(
|
|
@@ -197,30 +172,12 @@ class Converter:
|
|
|
197
172
|
)
|
|
198
173
|
|
|
199
174
|
@staticmethod
|
|
200
|
-
def
|
|
201
|
-
return
|
|
202
|
-
url=link_result.url,
|
|
203
|
-
id=link_result.id,
|
|
204
|
-
title=link_result.title,
|
|
205
|
-
description=link_result.description,
|
|
206
|
-
type=link_result.type,
|
|
207
|
-
has_info=link_result.has_info
|
|
208
|
-
)
|
|
209
|
-
|
|
210
|
-
@staticmethod
|
|
211
|
-
def test_run_to_update_empty_request(test_run: TestRun) -> UpdateEmptyTestRunApiModel:
|
|
212
|
-
return UpdateEmptyTestRunApiModel(
|
|
175
|
+
def test_run_to_update_empty_request(test_run: TestRun) -> TestRunV2PutModel:
|
|
176
|
+
return TestRunV2PutModel(
|
|
213
177
|
id=test_run.id,
|
|
214
178
|
name=test_run.name,
|
|
215
179
|
description=test_run.description,
|
|
216
180
|
launch_source=test_run.launch_source,
|
|
217
|
-
attachments=
|
|
181
|
+
attachments=test_run.attachments,
|
|
218
182
|
links=test_run.links
|
|
219
183
|
)
|
|
220
|
-
|
|
221
|
-
@staticmethod
|
|
222
|
-
def test_run_attachments_to(attachments: list[AttachmentPutModel]) -> list[AssignAttachmentApiModel]:
|
|
223
|
-
def convert(x: AttachmentPutModel) -> AssignAttachmentApiModel:
|
|
224
|
-
return AssignAttachmentApiModel(id=x.id, model_config=x.model_config)
|
|
225
|
-
|
|
226
|
-
return [convert(x) for x in attachments]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: testit-cli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0.post523
|
|
4
4
|
Summary: This tool is the command line wrapper of Test IT allowing you to upload the test results in real time to Test IT
|
|
5
5
|
Home-page: https://pypi.org/project/testit-cli/
|
|
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
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: testit-api-client==5.
|
|
19
|
+
Requires-Dist: testit-api-client==5.0.0
|
|
20
20
|
Requires-Dist: validators
|
|
21
21
|
Requires-Dist: tqdm
|
|
22
22
|
Requires-Dist: click~=8.0.4
|
|
@@ -41,12 +41,13 @@ You can see more information in [official documentation](https://docs.testit.sof
|
|
|
41
41
|
|
|
42
42
|
## Compatibility
|
|
43
43
|
|
|
44
|
-
| Test IT | Test IT CLI
|
|
45
|
-
|
|
46
|
-
| 3.5+ | 0.1
|
|
47
|
-
| 4.4 | 1.0
|
|
48
|
-
| 4.5 | 1.2
|
|
49
|
-
| 4.6 | 1.5
|
|
50
|
-
| 5.0 | 2.0
|
|
51
|
-
| 5.2 | 2.1
|
|
52
|
-
| 5.2.2 | 2.2.1.post522
|
|
44
|
+
| Test IT | Test IT CLI |
|
|
45
|
+
|---------|---------------|
|
|
46
|
+
| 3.5+ | 0.1 |
|
|
47
|
+
| 4.4 | 1.0 |
|
|
48
|
+
| 4.5 | 1.2 |
|
|
49
|
+
| 4.6 | 1.5 |
|
|
50
|
+
| 5.0 | 2.0 |
|
|
51
|
+
| 5.2 | 2.1 |
|
|
52
|
+
| 5.2.2 | 2.2.1.post522 |
|
|
53
|
+
| 5.2.3 | 2.3.0.post523 |
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{testit_cli-2.2.2.post522 → testit_cli-2.3.0.post523}/src/testit_cli.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|