• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

testit-tms / adapters-python / 21520296532

30 Jan 2026 03:04PM UTC coverage: 37.233% (+0.05%) from 37.183%
21520296532

push

github

web-flow
release: support tms 5.6. (#226)

Co-authored-by: pavel.butuzov <pavel.butuzov@testit.software>

21 of 45 new or added lines in 7 files covered. (46.67%)

2 existing lines in 2 files now uncovered.

1327 of 3564 relevant lines covered (37.23%)

0.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

53.23
/testit-python-commons/src/testit_python_commons/client/converter.py
1
import logging
2✔
2
from typing import List
2✔
3

4
from testit_api_client.models import (
2✔
5
    ApiV2TestResultsSearchPostRequest,
6
    AutoTestApiResult,
7
    AttachmentPutModelAutoTestStepResultsModel,
8
    AutoTestStepResultUpdateRequest,
9
    CreateAutoTestRequest,
10
    UpdateAutoTestRequest,
11
    AutoTestCreateApiModel,
12
    AutoTestUpdateApiModel,
13
    AutoTestResultsForTestRunModel,
14
    AutoTestStepApiModel,
15
    AvailableTestResultOutcome,
16
    LinkPostModel,
17
    LinkCreateApiModel,
18
    LinkUpdateApiModel,
19
    LinkType,
20
    CreateEmptyRequest,
21
    TestRunV2ApiResult,
22
    TestResultShortResponse,
23
    AutoTestSearchApiModelFilter,
24
    AutoTestSearchApiModelIncludes,
25
    ApiV2AutoTestsSearchPostRequest,
26
    ApiV2TestResultsIdPutRequest,
27
    TestResultResponse,
28
    AttachmentApiResult,
29
    AttachmentUpdateRequest,
30
    UpdateEmptyRequest,
31
    LinkApiResult,
32
    UpdateLinkApiModel,
33
    AssignAttachmentApiModel,
34
)
35

36
from testit_python_commons.models.link import Link
2✔
37
from testit_python_commons.models.step_result import StepResult
2✔
38
from testit_python_commons.models.test_result import TestResult
2✔
39
from testit_python_commons.models.test_result_with_all_fixture_step_results_model import TestResultWithAllFixtureStepResults
2✔
40
from testit_python_commons.services.logger import adapter_logger
2✔
41

42

43
class Converter:
2✔
44
    @staticmethod
2✔
45
    @adapter_logger
2✔
46
    def test_run_to_test_run_short_model(project_id: str, name: str) -> CreateEmptyRequest:
2✔
47
        return CreateEmptyRequest(
×
48
            project_id=project_id,
49
            name=name
50
        )
51

52
    @staticmethod
2✔
53
    @adapter_logger
2✔
54
    def get_id_from_create_test_run_response(response: TestRunV2ApiResult) -> str:
2✔
55
        return response.id
×
56

57
    @classmethod
2✔
58
    @adapter_logger
2✔
59
    def build_update_empty_request(cls, test_run: TestRunV2ApiResult) -> UpdateEmptyRequest:
2✔
60
        return UpdateEmptyRequest(
×
61
            id=test_run.id,
62
            name=test_run.name,
63
            description=test_run.description,
64
            launch_source=test_run.launch_source,
65
            attachments=list(map(cls.build_assign_attachment_api_model, test_run.attachments)),
66
            links=list(map(cls.build_update_link_api_model, test_run.links))
67
        )
68

69
    @staticmethod
2✔
70
    @adapter_logger
2✔
71
    def build_update_link_api_model(link: LinkApiResult) -> UpdateLinkApiModel:
2✔
72
        return UpdateLinkApiModel(
×
73
            id=link.id,
74
            title=link.title,
75
            description=link.description,
76
            type=link.type,
77
            url=link.url,
78
            has_info=link.has_info
79
        )
80

81
    @staticmethod
2✔
82
    @adapter_logger
2✔
83
    def build_assign_attachment_api_model(attachment: AttachmentApiResult) -> AssignAttachmentApiModel:
2✔
84
        return AssignAttachmentApiModel(id=attachment.id)
×
85

86
    @staticmethod
2✔
87
    @adapter_logger
2✔
88
    def project_id_and_external_id_to_auto_tests_search_post_request(
2✔
89
            project_id: str,
90
            external_id: str
91
    ) -> ApiV2AutoTestsSearchPostRequest:
92
        autotests_filter = AutoTestSearchApiModelFilter(
×
93
            project_ids=[project_id],
94
            external_ids=[external_id],
95
            is_deleted=False)
96
        autotests_includes = AutoTestSearchApiModelIncludes(
×
97
            include_steps=False,
98
            include_links=False,
99
            include_labels=False)
100

101
        return ApiV2AutoTestsSearchPostRequest(filter=autotests_filter, includes=autotests_includes)
×
102

103
    @staticmethod
2✔
104
    @adapter_logger
2✔
105
    def build_test_results_search_post_request_with_in_progress_outcome(
2✔
106
            testrun_id: str,
107
            configuration_id: str) -> ApiV2TestResultsSearchPostRequest:
108
        return ApiV2TestResultsSearchPostRequest(
×
109
            test_run_ids=[testrun_id],
110
            configuration_ids=[configuration_id],
111
            status_codes=["InProgress"])
112

113
    @staticmethod
2✔
114
    @adapter_logger
2✔
115
    def autotest_ids_to_autotests_search_post_request(
2✔
116
            autotest_ids: List[int]) -> ApiV2AutoTestsSearchPostRequest:
117
        autotests_filter = AutoTestSearchApiModelFilter(
×
118
            global_ids=autotest_ids)
119
        autotests_includes = AutoTestSearchApiModelIncludes(
×
120
            include_steps=False,
121
            include_links=False,
122
            include_labels=False)
123

124
        return ApiV2AutoTestsSearchPostRequest(filter=autotests_filter, includes=autotests_includes)
×
125

126
    @staticmethod
2✔
127
    @adapter_logger
2✔
128
    def get_external_ids_from_autotest_response_list(
2✔
129
            autotests: List[TestResultShortResponse],
130
            configuration: str) -> List[str]:
131
        external_ids: List[str] = []
×
132

133
        for autotest in autotests:
×
134
            if configuration == autotest.configuration_id:
×
135
                external_ids.append(autotest.autotest_external_id)
×
136

137
        return external_ids
×
138

139
    @classmethod
2✔
140
    @adapter_logger
2✔
141
    def test_result_to_autotest_post_model(
2✔
142
            cls,
143
            test_result: TestResult,
144
            project_id: str) -> AutoTestCreateApiModel:
NEW
145
        return AutoTestCreateApiModel(
×
146
            external_id=test_result.get_external_id(),
147
            project_id=project_id,
148
            name=test_result.get_autotest_name(),
149
            steps=cls.step_results_to_autotest_steps_model(
150
                test_result.get_step_results()),
151
            setup=cls.step_results_to_autotest_steps_model(
152
                test_result.get_setup_results()),
153
            teardown=cls.step_results_to_autotest_steps_model(
154
                test_result.get_teardown_results()),
155
            namespace=test_result.get_namespace(),
156
            classname=test_result.get_classname(),
157
            title=test_result.get_title(),
158
            description=test_result.get_description(),
159
            links=cls.links_to_links_create_api_model(test_result.get_links()),
160
            labels=test_result.get_labels(),
161
            should_create_work_item=test_result.get_automatic_creation_test_cases(),
162
            external_key=test_result.get_external_key()
163
        )
164

165
    @classmethod
2✔
166
    @adapter_logger
2✔
167
    def test_result_to_create_autotest_request(
2✔
168
            cls,
169
            test_result: TestResult,
170
            project_id: str) -> CreateAutoTestRequest:
171
        return CreateAutoTestRequest(
×
172
            external_id=test_result.get_external_id(),
173
            project_id=project_id,
174
            name=test_result.get_autotest_name(),
175
            steps=cls.step_results_to_autotest_steps_model(
176
                test_result.get_step_results()),
177
            setup=cls.step_results_to_autotest_steps_model(
178
                test_result.get_setup_results()),
179
            teardown=cls.step_results_to_autotest_steps_model(
180
                test_result.get_teardown_results()),
181
            namespace=test_result.get_namespace(),
182
            classname=test_result.get_classname(),
183
            title=test_result.get_title(),
184
            description=test_result.get_description(),
185
            links=cls.links_to_links_create_api_model(test_result.get_links()),
186
            labels=test_result.get_labels(),
187
            should_create_work_item=test_result.get_automatic_creation_test_cases(),
188
            external_key=test_result.get_external_key()
189
        )
190

191
    @classmethod
2✔
192
    @adapter_logger
2✔
193
    def test_result_to_autotest_put_model(
2✔
194
            cls,
195
            test_result: TestResult,
196
            project_id: str) -> AutoTestUpdateApiModel:
197
        if test_result.get_outcome() == 'Passed':
×
NEW
198
            return AutoTestUpdateApiModel(
×
199
                external_id=test_result.get_external_id(),
200
                project_id=project_id,
201
                name=test_result.get_autotest_name(),
202
                steps=cls.step_results_to_autotest_steps_model(
203
                    test_result.get_step_results()),
204
                setup=cls.step_results_to_autotest_steps_model(
205
                    test_result.get_setup_results()),
206
                teardown=cls.step_results_to_autotest_steps_model(
207
                    test_result.get_teardown_results()),
208
                namespace=test_result.get_namespace(),
209
                classname=test_result.get_classname(),
210
                title=test_result.get_title(),
211
                description=test_result.get_description(),
212
                links=cls.links_to_links_put_model(test_result.get_links()),
213
                labels=test_result.get_labels(),
214
                external_key=test_result.get_external_key()
215
            )
216
        else:
NEW
217
            return AutoTestUpdateApiModel(
×
218
                external_id=test_result.get_external_id(),
219
                project_id=project_id,
220
                name=test_result.get_autotest_name(),
221
                steps=cls.step_results_to_autotest_steps_model(
222
                    test_result.get_step_results()),
223
                setup=cls.step_results_to_autotest_steps_model(
224
                    test_result.get_setup_results()),
225
                teardown=cls.step_results_to_autotest_steps_model(
226
                    test_result.get_teardown_results()),
227
                namespace=test_result.get_namespace(),
228
                classname=test_result.get_classname(),
229
                title=test_result.get_title(),
230
                description=test_result.get_description(),
231
                links=cls.links_to_links_put_model(test_result.get_links()),
232
                labels=test_result.get_labels(),
233
                external_key=test_result.get_external_key()
234
            )
235

236
    @classmethod
2✔
237
    @adapter_logger
2✔
238
    def test_result_to_update_autotest_request(
2✔
239
            cls,
240
            test_result: TestResult,
241
            project_id: str) -> UpdateAutoTestRequest:
242
        if test_result.get_outcome() == 'Passed':
×
243
            return UpdateAutoTestRequest(
×
244
                external_id=test_result.get_external_id(),
245
                project_id=project_id,
246
                name=test_result.get_autotest_name(),
247
                steps=cls.step_results_to_autotest_steps_model(
248
                    test_result.get_step_results()),
249
                setup=cls.step_results_to_autotest_steps_model(
250
                    test_result.get_setup_results()),
251
                teardown=cls.step_results_to_autotest_steps_model(
252
                    test_result.get_teardown_results()),
253
                namespace=test_result.get_namespace(),
254
                classname=test_result.get_classname(),
255
                title=test_result.get_title(),
256
                description=test_result.get_description(),
257
                links=cls.links_to_links_put_model(test_result.get_links()),
258
                labels=test_result.get_labels(),
259
                external_key=test_result.get_external_key()
260
            )
261
        else:
262
            return UpdateAutoTestRequest(
×
263
                external_id=test_result.get_external_id(),
264
                project_id=project_id,
265
                name=test_result.get_autotest_name(),
266
                steps=cls.step_results_to_autotest_steps_model(
267
                    test_result.get_step_results()),
268
                setup=cls.step_results_to_autotest_steps_model(
269
                    test_result.get_setup_results()),
270
                teardown=cls.step_results_to_autotest_steps_model(
271
                    test_result.get_teardown_results()),
272
                namespace=test_result.get_namespace(),
273
                classname=test_result.get_classname(),
274
                title=test_result.get_title(),
275
                description=test_result.get_description(),
276
                links=cls.links_to_links_put_model(test_result.get_links()),
277
                labels=test_result.get_labels(),
278
                external_key=test_result.get_external_key()
279
            )
280

281
    @classmethod
2✔
282
    @adapter_logger
2✔
283
    def test_result_to_testrun_result_post_model(
2✔
284
            cls,
285
            test_result: TestResult,
286
            configuration_id: str) -> AutoTestResultsForTestRunModel:
287
        return AutoTestResultsForTestRunModel(
×
288
            configuration_id=configuration_id,
289
            auto_test_external_id=test_result.get_external_id(),
290
            status_code=test_result.get_outcome(),
291
            step_results=cls.step_results_to_attachment_put_model_autotest_step_results_model(
292
                test_result.get_step_results()),
293
            setup_results=cls.step_results_to_attachment_put_model_autotest_step_results_model(
294
                test_result.get_setup_results()),
295
            teardown_results=cls.step_results_to_attachment_put_model_autotest_step_results_model(
296
                test_result.get_teardown_results()),
297
            traces=test_result.get_traces(),
298
            attachments=test_result.get_attachments(),
299
            parameters=test_result.get_parameters(),
300
            properties=test_result.get_properties(),
301
            links=cls.links_to_links_post_model(
302
                test_result.get_result_links()),
303
            duration=round(test_result.get_duration()),
304
            message=test_result.get_message(),
305
            started_on=test_result.get_started_on(),
306
            completed_on=test_result.get_completed_on()
307
        )
308

309
    @classmethod
2✔
310
    @adapter_logger
2✔
311
    def convert_test_result_model_to_test_results_id_put_request(
2✔
312
            cls,
313
            test_result: TestResultResponse) -> ApiV2TestResultsIdPutRequest:
314
        return ApiV2TestResultsIdPutRequest(
×
315
            failure_class_ids=test_result.failure_class_ids,
316
            status_code=test_result.status.code,
317
            comment=test_result.comment,
318
            links=test_result.links,
319
            step_results=test_result.step_results,
320
            attachments=cls.attachment_models_to_attachment_put_models(test_result.attachments),
321
            duration_in_ms=test_result.duration_in_ms,
322
            step_comments=test_result.step_comments,
323
            # setup_results=test_result.setup_results,
324
            # teardown_results=test_result.teardown_results,
325
            message=test_result.message,
326
            trace=test_result.traces)
327

328
    @classmethod
2✔
329
    @adapter_logger
2✔
330
    def convert_test_result_with_all_setup_and_teardown_steps_to_test_results_id_put_request(
2✔
331
            cls,
332
            test_result: TestResultWithAllFixtureStepResults) -> ApiV2TestResultsIdPutRequest:
333
        return ApiV2TestResultsIdPutRequest(
×
334
            setup_results=cls.step_results_to_attachment_put_model_autotest_step_results_model(
335
                test_result.get_setup_results()),
336
            teardown_results=cls.step_results_to_attachment_put_model_autotest_step_results_model(
337
                test_result.get_teardown_results()))
338

339
    @classmethod
2✔
340
    @adapter_logger
2✔
341
    def get_test_result_id_from_testrun_result_post_response(cls, response) -> str:
2✔
342
        return response[0]
×
343

344
    @staticmethod
2✔
345
    @adapter_logger
2✔
346
    def link_to_link_post_model(link: Link) -> LinkPostModel:
2✔
347
        if link.get_link_type():
×
348
            return LinkPostModel(
×
349
                url=link.get_url(),
350
                title=link.get_title(),
351
                type=LinkType(link.get_link_type()),
352
                description=link.get_description(),
353
                has_info=True,
354
            )
355
        else:
356
            return LinkPostModel(
×
357
                url=link.get_url(),
358
                title=link.get_title(),
359
                description=link.get_description(),
360
                has_info=True,
361
            )
362

363
    @staticmethod
2✔
364
    @adapter_logger
2✔
365
    def link_to_link_create_api_model(link: Link) -> LinkCreateApiModel:
2✔
366
        if link.get_link_type():
×
NEW
367
            return LinkCreateApiModel(
×
368
                url=link.get_url(),
369
                title=link.get_title(),
370
                type=LinkType(link.get_link_type()),
371
                description=link.get_description(),
372
                has_info=True,
373
            )
374
        else:
NEW
375
            return LinkCreateApiModel(
×
376
                url=link.get_url(),
377
                title=link.get_title(),
378
                description=link.get_description(),
379
                has_info=True,
380
            )
381

382
    @staticmethod
2✔
383
    @adapter_logger
2✔
384
    def link_to_link_put_model(link: Link) -> LinkUpdateApiModel:
2✔
NEW
385
        if link.get_link_type():
×
NEW
386
            return LinkUpdateApiModel(
×
387
                url=link.get_url(),
388
                title=link.get_title(),
389
                type=LinkType(link.get_link_type()),
390
                description=link.get_description(),
391
                has_info=True,
392
            )
393
        else:
NEW
394
            return LinkUpdateApiModel(
×
395
                url=link.get_url(),
396
                title=link.get_title(),
397
                description=link.get_description(),
398
                has_info=True,
399
            )
400

401
    @classmethod
2✔
402
    @adapter_logger
2✔
403
    def links_to_links_post_model(cls, links: List[Link]) -> List[LinkPostModel]:
2✔
404
        post_model_links = []
×
405

406
        for link in links:
×
407
            post_model_links.append(
×
408
                cls.link_to_link_post_model(link)
409
            )
410

411
        return post_model_links
×
412

413
    @classmethod
2✔
414
    @adapter_logger
2✔
415
    def links_to_links_create_api_model(cls, links: List[Link]) -> List[LinkCreateApiModel]:
2✔
NEW
416
        create_api_model_links = []
×
417

NEW
418
        for link in links:
×
NEW
419
            create_api_model_links.append(
×
420
                cls.link_to_link_create_api_model(link)
421
            )
422

NEW
423
        return create_api_model_links
×
424

425
    @classmethod
2✔
426
    @adapter_logger
2✔
427
    def links_to_links_put_model(cls, links: List[Link]) -> List[LinkUpdateApiModel]:
2✔
UNCOV
428
        put_model_links = []
×
429

430
        for link in links:
×
431
            put_model_links.append(
×
432
                cls.link_to_link_put_model(link)
433
            )
434

435
        return put_model_links
×
436

437
    @classmethod
2✔
438
    @adapter_logger
2✔
439
    def attachment_models_to_attachment_put_models(
2✔
440
            cls, attachments: List[AttachmentApiResult]) -> List[AttachmentUpdateRequest]:
441
        put_model_attachments = []
×
442

443
        for attachment in attachments:
×
444
            put_model_attachments.append(
×
445
                cls.attachment_model_to_attachment_put_model(attachment)
446
            )
447

448
        return put_model_attachments
×
449

450
    @staticmethod
2✔
451
    @adapter_logger
2✔
452
    def attachment_model_to_attachment_put_model(attachment: AttachmentApiResult) -> AttachmentUpdateRequest:
2✔
453
        return AttachmentUpdateRequest(id=attachment.id)
×
454

455
    @classmethod
2✔
456
    # @adapter_logger
457
    def step_results_to_autotest_steps_model(
2✔
458
            cls, step_results: List[StepResult]) -> List[AutoTestStepApiModel]:
459
        autotest_model_steps = []
×
460

461
        for step_result in step_results:
×
462
            autotest_model_steps.append(
×
463
                AutoTestStepApiModel(
464
                    title=step_result.get_title(),
465
                    description=step_result.get_description(),
466
                    steps=cls.step_results_to_autotest_steps_model(
467
                        step_result.get_step_results()))
468
            )
469

470
        return autotest_model_steps
×
471

472
    @classmethod
2✔
473
    @adapter_logger
2✔
474
    def step_results_to_attachment_put_model_autotest_step_results_model(
2✔
475
            cls, step_results: List[StepResult]) -> List[AttachmentPutModelAutoTestStepResultsModel]:
476
        autotest_model_step_results = []
×
477

478
        for step_result in step_results:
×
479
            autotest_model_step_results.append(
×
480
                AttachmentPutModelAutoTestStepResultsModel(
481
                    title=step_result.get_title(),
482
                    outcome=AvailableTestResultOutcome(step_result.get_outcome()),
483
                    description=step_result.get_description(),
484
                    duration=step_result.get_duration(),
485
                    parameters=step_result.get_parameters(),
486
                    attachments=step_result.get_attachments(),
487
                    started_on=step_result.get_started_on(),
488
                    completed_on=step_result.get_completed_on(),
489
                    step_results=cls.step_results_to_attachment_put_model_autotest_step_results_model(
490
                        step_result.get_step_results())
491
                )
492
            )
493

494
        return autotest_model_step_results
×
495

496
    @staticmethod
2✔
497
    @adapter_logger
2✔
498
    def fixtures_containers_to_test_results_with_all_fixture_step_results(
2✔
499
            fixtures_containers: dict,
500
            test_result_ids: dict) -> List[TestResultWithAllFixtureStepResults]:
501
        test_results_with_all_fixture_step_results = []
×
502

503
        for external_id, test_result_id in test_result_ids.items():
×
504
            test_result_with_all_fixture_step_results = TestResultWithAllFixtureStepResults(test_result_id)
×
505

506
            for uuid, fixtures_container in fixtures_containers.items():
×
507
                if external_id in fixtures_container.external_ids:
×
508
                    if fixtures_container.befores:
×
509
                        test_result_with_all_fixture_step_results.set_setup_results(fixtures_container.befores[0].steps)
×
510

511
                    if fixtures_container.afters:
×
512
                        test_result_with_all_fixture_step_results.set_teardown_results(
×
513
                            fixtures_container.afters[0].steps)
514

515
            test_results_with_all_fixture_step_results.append(test_result_with_all_fixture_step_results)
×
516

517
        return test_results_with_all_fixture_step_results
×
518

519
    @classmethod
2✔
520
    @adapter_logger
2✔
521
    def step_results_to_auto_test_step_result_update_request(
2✔
522
            cls, step_results: List[StepResult]) -> List[AutoTestStepResultUpdateRequest]:
523
        autotest_model_step_results = []
×
524

525
        for step_result in step_results:
×
526
            autotest_model_step_results.append(
×
527
                AutoTestStepResultUpdateRequest(
528
                    title=step_result.get_title(),
529
                    outcome=AvailableTestResultOutcome(step_result.get_outcome()),
530
                    description=step_result.get_description(),
531
                    duration=step_result.get_duration(),
532
                    parameters=step_result.get_parameters(),
533
                    attachments=step_result.get_attachments(),
534
                    started_on=step_result.get_started_on(),
535
                    completed_on=step_result.get_completed_on(),
536
                    step_results=cls.step_results_to_auto_test_step_result_update_request(
537
                        step_result.get_step_results())
538
                )
539
            )
540

541
        return autotest_model_step_results
×
542

543
    @classmethod
2✔
544
    @adapter_logger
2✔
545
    def prepare_to_create_autotest(
2✔
546
            cls,
547
            test_result: TestResult,
548
            project_id: str,
549
            work_item_ids_for_link_with_auto_test: list) -> CreateAutoTestRequest:
550
        logging.debug('Preparing to create the auto test ' + test_result.get_external_id())
×
551

552
        model = cls.test_result_to_create_autotest_request(
×
553
            test_result,
554
            project_id)
555
        model.work_item_ids_for_link_with_auto_test = work_item_ids_for_link_with_auto_test
×
556

557
        return model
×
558

559
    @classmethod
2✔
560
    @adapter_logger
2✔
561
    def prepare_to_mass_create_autotest(
2✔
562
            cls,
563
            test_result: TestResult,
564
            project_id: str,
565
            work_item_ids_for_link_with_auto_test: list) -> AutoTestCreateApiModel:
566
        logging.debug('Preparing to create the auto test ' + test_result.get_external_id())
×
567

568
        model = cls.test_result_to_autotest_post_model(
×
569
            test_result,
570
            project_id)
571
        model.work_item_ids_for_link_with_auto_test = work_item_ids_for_link_with_auto_test
×
572

573
        return model
×
574

575
    @classmethod
2✔
576
    @adapter_logger
2✔
577
    def prepare_to_update_autotest(
2✔
578
            cls,
579
            test_result: TestResult,
580
            autotest: AutoTestApiResult,
581
            project_id: str) -> UpdateAutoTestRequest:
582
        logging.debug('Preparing to update the auto test ' + test_result.get_external_id())
×
583

584
        model = cls.test_result_to_update_autotest_request(
×
585
            test_result,
586
            project_id)
587
        model.is_flaky = autotest.is_flaky
×
588
        # TODO: return after fix PUT/api/v2/autoTests
589
        # model.work_item_ids_for_link_with_auto_test = self.__get_work_item_uuids_for_link_with_auto_test(
590
        #     test_result.get_work_item_ids(),
591
        #     str(autotest.global_id))
592

593
        return model
×
594

595
    @classmethod
2✔
596
    @adapter_logger
2✔
597
    def prepare_to_mass_update_autotest(
2✔
598
            cls,
599
            test_result: TestResult,
600
            autotest: AutoTestApiResult,
601
            project_id: str) -> AutoTestUpdateApiModel:
602
        logging.debug('Preparing to update the auto test ' + test_result.get_external_id())
×
603

604
        model = cls.test_result_to_autotest_put_model(
×
605
            test_result,
606
            project_id)
607
        model.is_flaky = autotest.is_flaky
×
608
        # TODO: return after fix PUT/api/v2/autoTests
609
        # model.work_item_ids_for_link_with_auto_test = self.__get_work_item_uuids_for_link_with_auto_test(
610
        #     test_result.get_work_item_ids(),
611
        #     str(autotest.global_id))
612

613
        return model
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc