testit-python-commons 5.2.2__py3-none-any.whl → 5.2.3__py3-none-any.whl

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.py CHANGED
@@ -12,6 +12,7 @@ from testit_python_commons.decorators import (
12
12
  nameSpace,
13
13
  title,
14
14
  workItemID,
15
+ workItemId,
15
16
  workItemIds
16
17
  )
17
18
  from testit_python_commons.dynamic_methods import (
@@ -19,6 +20,7 @@ from testit_python_commons.dynamic_methods import (
19
20
  addLink,
20
21
  addLinks,
21
22
  addMessage,
23
+ addWorkItemId,
22
24
  addWorkItemIds,
23
25
  addDisplayName,
24
26
  addNameSpace,
@@ -43,6 +45,7 @@ __all__ = [
43
45
  'nameSpace',
44
46
  'className',
45
47
  'workItemID',
48
+ 'workItemId',
46
49
  'workItemIds',
47
50
  'title',
48
51
  'description',
@@ -57,6 +60,7 @@ __all__ = [
57
60
  'addAttachments',
58
61
  'message',
59
62
  'addMessage',
63
+ 'addWorkItemId',
60
64
  'addWorkItemIds',
61
65
  'addDisplayName',
62
66
  'addNameSpace',
@@ -37,7 +37,7 @@ def inner(function):
37
37
  return function
38
38
 
39
39
 
40
- @Utils.deprecated('Use "workItemIds" instead.')
40
+ @Utils.deprecated('Use "workItemId" instead.')
41
41
  @adapter_logger
42
42
  def workItemID(*test_workitems_id: int or str): # noqa: N802
43
43
  def outer(function):
@@ -49,6 +49,19 @@ def workItemID(*test_workitems_id: int or str): # noqa: N802
49
49
  return outer
50
50
 
51
51
 
52
+ @adapter_logger
53
+ def workItemId(globalId: int or str): # noqa: N802
54
+ """
55
+ specifies a method that links an autotest with a manual test. Receives a single globalId
56
+ """
57
+ def outer(function):
58
+ function.test_workitems_id = [str(globalId)]
59
+ return inner(function)
60
+
61
+ return outer
62
+
63
+
64
+ @Utils.deprecated('Use "workItemId" instead.')
52
65
  @adapter_logger
53
66
  def workItemIds(*test_workitems_id: int or str): # noqa: N802
54
67
  """
@@ -130,6 +130,7 @@ def __add_attachments_to_test(data, is_text: bool = False, name: str = None):
130
130
  logging.warning(f'({data}) is not path!')
131
131
 
132
132
 
133
+ @Utils.deprecated('Use "addWorkItemId" instead.')
133
134
  @adapter_logger
134
135
  def addWorkItemIds(*test_work_item_ids: int or str): # noqa: N802
135
136
  """
@@ -142,6 +143,17 @@ def addWorkItemIds(*test_work_item_ids: int or str): # noqa: N802
142
143
  TmsPluginManager.get_plugin_manager().hook.add_work_item_id(test_work_item_id=str(test_work_item_id))
143
144
 
144
145
 
146
+ @adapter_logger
147
+ def addWorkItemId(globalId: int or str): # noqa: N802
148
+ """
149
+ a dynamic method that links an autotest with a manual test. Receives a single globalId
150
+ """
151
+ if not hasattr(TmsPluginManager.get_plugin_manager().hook, 'add_work_item_id'):
152
+ return
153
+
154
+ TmsPluginManager.get_plugin_manager().hook.add_work_item_id(test_work_item_id=str(globalId))
155
+
156
+
145
157
  @adapter_logger
146
158
  def addDisplayName(test_display_name: str): # noqa: N802
147
159
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: testit-python-commons
3
- Version: 5.2.2
3
+ Version: 5.2.3
4
4
  Summary: Python commons for Test IT
5
5
  Home-page: https://github.com/testit-tms/adapters-python/
6
6
  Author: Integration team
@@ -1,4 +1,4 @@
1
- testit.py,sha256=C5BsPRgKaquGB656kuE75QWEhSqBjGSZfNYBzPnBofo,1303
1
+ testit.py,sha256=iNy08vrdtMqxr08L6Xwyz2LzDtWrvBP5-mwmcwXU42Q,1377
2
2
  adapters_api/__init__.py,sha256=fqW8APi58KZ76csM-f1XP1XAgfzMFQuIMQ6F2EBo9xE,749
3
3
  adapters_api/api_client.py,sha256=eBdekkUzczBxt3aZL6VcnU4L70LV_Fk0wPFGWmQQNyo,39263
4
4
  adapters_api/configuration.py,sha256=JZv-bDb_CNGYjNpIvydnCxlyTcE119bjM02dixGcZI4,17594
@@ -223,8 +223,8 @@ api_client_syncstorage/model/test_result_save_response.py,sha256=Q7J6WD6Yzx6TWYO
223
223
  api_client_syncstorage/models/__init__.py,sha256=-Wa3--s7VgbP9o6_RY33g1lXm5J-1PSqLw7VcpPZsaY,1131
224
224
  testit_python_commons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
225
225
  testit_python_commons/app_properties.py,sha256=0o7G24OMdcyv7eZUAaZjyvuEp1z9QVVlnDMIra-wXQQ,9891
226
- testit_python_commons/decorators.py,sha256=5P0VF1z0rncMiB-G_eeuj536vizYj2UQVDroXYzAYXA,6224
227
- testit_python_commons/dynamic_methods.py,sha256=WKHHA6Uj61tWXI3DphALYOi2BV6TnQKvQy0-Vt2JR2I,8816
226
+ testit_python_commons/decorators.py,sha256=gO45ohjihgTSioytJyM9OhwD6cMy4XhPF7llL7ibKgM,6576
227
+ testit_python_commons/dynamic_methods.py,sha256=jhM_SQAsJm6hqtad8vlqxvChShlI1G_SNuUBZ7ov5DU,9243
228
228
  testit_python_commons/step.py,sha256=CYUs_S8opmRg1tsTY1dVJOPzzt-HYR3_uLTBpYtHSfQ,3244
229
229
  testit_python_commons/client/__init__.py,sha256=zSJhxDHzWWTFHJ0s8bqCaBtM5FK2GcPgZxaKdI8zf-o,165
230
230
  testit_python_commons/client/api_client.py,sha256=j6omqfCR_FI0OvTlW-li291BwL96U7e8agdbG4Fs7k0,25725
@@ -266,7 +266,7 @@ testit_python_commons/services/sync_storage/__init__.py,sha256=Qmjs6Xk5l-i5FFItk
266
266
  testit_python_commons/services/sync_storage/sync_storage_runner.py,sha256=DPOHJZ57otKlmAHHD7JV1rfYAgSTm0fYTvlp1QFtR4I,20539
267
267
  testit_python_commons/utils/__init__.py,sha256=CUHziylwvFAuKyUM1tCp13ik5Z2Mw-VK8n7c92aVy-I,78
268
268
  testit_python_commons/utils/html_escape_utils.py,sha256=xizAyxl0eQa1joW0pLgAhe1E8KYxPpEDxSkKcswlDR4,8758
269
- testit_python_commons-5.2.2.dist-info/METADATA,sha256=dx7oKINtc3VyVVeO0Zu-Y2UEJn9EZrNFuEqd-XBgI-Y,1766
270
- testit_python_commons-5.2.2.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
271
- testit_python_commons-5.2.2.dist-info/top_level.txt,sha256=TuyfRneOyFuvNz83bbn-pWaAR1fY7FINrrJRTW9Lyqg,65
272
- testit_python_commons-5.2.2.dist-info/RECORD,,
269
+ testit_python_commons-5.2.3.dist-info/METADATA,sha256=otiUcjTTUaMq8X5PZzKe69Ylaa3THexT9xMiHeHNaaE,1766
270
+ testit_python_commons-5.2.3.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
271
+ testit_python_commons-5.2.3.dist-info/top_level.txt,sha256=TuyfRneOyFuvNz83bbn-pWaAR1fY7FINrrJRTW9Lyqg,65
272
+ testit_python_commons-5.2.3.dist-info/RECORD,,