smartsheet-python-sdk 3.5.2__py2.py3-none-any.whl → 3.5.4__py2.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.
Files changed (59) hide show
  1. smartsheet/models/__init__.py +1 -0
  2. smartsheet/models/asset_share.py +138 -0
  3. smartsheet/models/asset_shares_paginated_result.py +2 -2
  4. smartsheet/sharing.py +5 -5
  5. smartsheet/version.py +2 -2
  6. {smartsheet_python_sdk-3.5.2.dist-info → smartsheet_python_sdk-3.5.4.dist-info}/METADATA +19 -7
  7. {smartsheet_python_sdk-3.5.2.dist-info → smartsheet_python_sdk-3.5.4.dist-info}/RECORD +11 -58
  8. {smartsheet_python_sdk-3.5.2.dist-info → smartsheet_python_sdk-3.5.4.dist-info}/WHEEL +1 -1
  9. {smartsheet_python_sdk-3.5.2.dist-info → smartsheet_python_sdk-3.5.4.dist-info}/top_level.txt +0 -1
  10. tests/__init__.py +0 -0
  11. tests/integration/README.md +0 -37
  12. tests/integration/conftest.py +0 -174
  13. tests/integration/fixtures/calling_all_curs.txt +0 -1
  14. tests/integration/fixtures/curly.jpg +0 -0
  15. tests/integration/fixtures/moe-curly.jpg +0 -0
  16. tests/integration/fixtures/quote.txt +0 -1
  17. tests/integration/fixtures/stooges_v1.jpg +0 -0
  18. tests/integration/fixtures/stooges_v2.jpg +0 -0
  19. tests/integration/test_attachments.py +0 -99
  20. tests/integration/test_columns.py +0 -91
  21. tests/integration/test_contacts.py +0 -27
  22. tests/integration/test_cross_sheet_references.py +0 -30
  23. tests/integration/test_discussions.py +0 -195
  24. tests/integration/test_events.py +0 -56
  25. tests/integration/test_favorites.py +0 -33
  26. tests/integration/test_folders.py +0 -130
  27. tests/integration/test_groups.py +0 -92
  28. tests/integration/test_home.py +0 -99
  29. tests/integration/test_model_attributes.py +0 -2848
  30. tests/integration/test_multi_picklist.py +0 -66
  31. tests/integration/test_object_value.py +0 -126
  32. tests/integration/test_passthrough.py +0 -37
  33. tests/integration/test_regression.py +0 -240
  34. tests/integration/test_reports.py +0 -134
  35. tests/integration/test_rows.py +0 -196
  36. tests/integration/test_server_info.py +0 -10
  37. tests/integration/test_sharing.py +0 -83
  38. tests/integration/test_sheet_summary.py +0 -64
  39. tests/integration/test_sheets.py +0 -384
  40. tests/integration/test_templates.py +0 -21
  41. tests/integration/test_update_requests.py +0 -61
  42. tests/integration/test_users.py +0 -134
  43. tests/integration/test_webhooks.py +0 -50
  44. tests/integration/test_workspaces.py +0 -271
  45. tests/integration/test_zsearch.py +0 -30
  46. tests/mock_api/__init__.py +0 -0
  47. tests/mock_api/mock_api_test_helper.py +0 -73
  48. tests/mock_api/test_mock_api_automation_rules.py +0 -39
  49. tests/mock_api/test_mock_api_columns.py +0 -48
  50. tests/mock_api/test_mock_api_folders.py +0 -184
  51. tests/mock_api/test_mock_api_rows.py +0 -715
  52. tests/mock_api/test_mock_api_sharing.py +0 -508
  53. tests/mock_api/test_mock_api_sheets.py +0 -42
  54. tests/mock_api/test_mock_api_sights.py +0 -58
  55. tests/mock_api/test_mock_api_workspaces.py +0 -241
  56. tests/mock_api/test_mock_change_agent.py +0 -26
  57. tests/mock_api/test_mock_serialization.py +0 -559
  58. {smartsheet_python_sdk-3.5.2.dist-info → smartsheet_python_sdk-3.5.4.dist-info/licenses}/LICENSE.md +0 -0
  59. {smartsheet_python_sdk-3.5.2.dist-info → smartsheet_python_sdk-3.5.4.dist-info/licenses}/NOTICE +0 -0
@@ -123,3 +123,4 @@ from .widget_content import WidgetContent
123
123
  from .workspace import Workspace
124
124
  from .user_plan import UserPlan
125
125
  from .asset_shares_paginated_result import AssetSharesPaginatedResult
126
+ from .asset_share import AssetShare
@@ -0,0 +1,138 @@
1
+ # pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101
2
+ # Smartsheet Python SDK.
3
+ #
4
+ # Copyright 2018 Smartsheet.com, Inc.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License"): you may
7
+ # not use this file except in compliance with the License. You may obtain
8
+ # a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
+ # License for the specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ from __future__ import absolute_import
19
+
20
+ from ..types import EnumeratedValue, String, json
21
+ from ..util import deserialize, serialize
22
+ from .enums import AccessLevel, ShareScope, ShareType
23
+
24
+
25
+ class AssetShare:
26
+
27
+ """Smartsheet AssetShare data model."""
28
+
29
+ def __init__(self, props=None, base_obj=None):
30
+ """Initialize the AssetShare model."""
31
+ self._base = None
32
+ if base_obj is not None:
33
+ self._base = base_obj
34
+
35
+ self._access_level = EnumeratedValue(AccessLevel)
36
+ self._email = String()
37
+ self._group_id = String()
38
+ self._id_ = String()
39
+ self._name = String()
40
+ self._scope = EnumeratedValue(ShareScope)
41
+ self._type_ = EnumeratedValue(ShareType)
42
+ self._user_id = String()
43
+
44
+ if props:
45
+ deserialize(self, props)
46
+
47
+ # requests package Response object
48
+ self.request_response = None
49
+ self.__initialized = True
50
+
51
+ def __getattr__(self, key):
52
+ if key == "id":
53
+ return self.id_
54
+ elif key == "type":
55
+ return self.type_
56
+ else:
57
+ raise AttributeError(key)
58
+
59
+ def __setattr__(self, key, value):
60
+ if key == "id":
61
+ self.id_ = value
62
+ elif key == "type":
63
+ self.type_ = value
64
+ else:
65
+ super().__setattr__(key, value)
66
+
67
+ @property
68
+ def access_level(self):
69
+ return self._access_level
70
+
71
+ @access_level.setter
72
+ def access_level(self, value):
73
+ self._access_level.set(value)
74
+
75
+ @property
76
+ def email(self):
77
+ return self._email.value
78
+
79
+ @email.setter
80
+ def email(self, value):
81
+ self._email.value = value
82
+
83
+ @property
84
+ def group_id(self):
85
+ return self._group_id.value
86
+
87
+ @group_id.setter
88
+ def group_id(self, value):
89
+ self._group_id.value = value
90
+
91
+ @property
92
+ def id_(self):
93
+ return self._id_.value
94
+
95
+ @id_.setter
96
+ def id_(self, value):
97
+ self._id_.value = value
98
+
99
+ @property
100
+ def name(self):
101
+ return self._name.value
102
+
103
+ @name.setter
104
+ def name(self, value):
105
+ self._name.value = value
106
+
107
+ @property
108
+ def scope(self):
109
+ return self._scope
110
+
111
+ @scope.setter
112
+ def scope(self, value):
113
+ self._scope.set(value)
114
+
115
+ @property
116
+ def type_(self):
117
+ return self._type_
118
+
119
+ @type_.setter
120
+ def type_(self, value):
121
+ self._type_.set(value)
122
+
123
+ @property
124
+ def user_id(self):
125
+ return self._user_id.value
126
+
127
+ @user_id.setter
128
+ def user_id(self, value):
129
+ self._user_id.value = value
130
+
131
+ def to_dict(self):
132
+ return serialize(self)
133
+
134
+ def to_json(self):
135
+ return json.dumps(self.to_dict())
136
+
137
+ def __str__(self):
138
+ return self.to_json()
@@ -20,7 +20,7 @@ from __future__ import absolute_import
20
20
  from typing import TypeVar, List
21
21
  from ..types import String, json, TypedList, importlib
22
22
  from ..util import deserialize, serialize
23
- from . import Share
23
+ from .asset_share import AssetShare
24
24
 
25
25
  T = TypeVar('T')
26
26
 
@@ -52,7 +52,7 @@ class AssetSharesPaginatedResult:
52
52
  self.__initialized = True
53
53
 
54
54
  @property
55
- def items(self) -> List[Share]:
55
+ def items(self) -> List[AssetShare]:
56
56
  return self._items
57
57
 
58
58
  @items.setter
smartsheet/sharing.py CHANGED
@@ -54,7 +54,7 @@ class Sharing:
54
54
  _op['query_params']['lastKey'] = last_key
55
55
  _op['query_params']['sharingInclude'] = sharing_include.name if sharing_include else None
56
56
 
57
- expected = ['AssetSharesPaginatedResult', 'Share']
57
+ expected = ['AssetSharesPaginatedResult', 'AssetShare']
58
58
 
59
59
  prepped_request = self._base.prepare_request(_op)
60
60
  response = self._base.request(prepped_request, expected, _op)
@@ -70,7 +70,7 @@ class Sharing:
70
70
  share_id (str): Share ID
71
71
 
72
72
  Returns:
73
- Share
73
+ AssetShare
74
74
  """
75
75
  _op = fresh_operation('get_asset_share')
76
76
  _op['method'] = 'GET'
@@ -78,7 +78,7 @@ class Sharing:
78
78
  _op['query_params']['assetType'] = asset_type
79
79
  _op['query_params']['assetId'] = asset_id
80
80
 
81
- expected = 'Share'
81
+ expected = 'AssetShare'
82
82
  prepped_request = self._base.prepare_request(_op)
83
83
  response = self._base.request(prepped_request, expected, _op)
84
84
 
@@ -106,7 +106,7 @@ class Sharing:
106
106
  _op['query_params']['sendEmail'] = send_email
107
107
  _op['json'] = share_obj
108
108
 
109
- expected = ['Result', 'Share']
109
+ expected = ['Result', 'AssetShare']
110
110
 
111
111
  prepped_request = self._base.prepare_request(_op)
112
112
  response = self._base.request(prepped_request, expected, _op)
@@ -132,7 +132,7 @@ class Sharing:
132
132
  _op['query_params']['assetId'] = asset_id
133
133
  _op['json'] = share_obj
134
134
 
135
- expected = 'Share'
135
+ expected = 'AssetShare'
136
136
 
137
137
  prepped_request = self._base.prepare_request(_op)
138
138
  response = self._base.request(prepped_request, expected, _op)
smartsheet/version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # file generated by setuptools_scm
2
2
  # don't change, don't track in version control
3
- __version__ = version = '3.5.2'
4
- __version_tuple__ = version_tuple = (3, 5, 2)
3
+ __version__ = version = '3.5.4'
4
+ __version_tuple__ = version_tuple = (3, 5, 4)
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
2
- Name: smartsheet-python-sdk
3
- Version: 3.5.2
1
+ Metadata-Version: 2.4
2
+ Name: smartsheet_python_sdk
3
+ Version: 3.5.4
4
4
  Summary: Library that uses Python to connect to Smartsheet services (using API 2.0).
5
5
  Home-page: http://smartsheet-platform.github.io/api-docs/
6
6
  Author: Smartsheet
@@ -27,15 +27,27 @@ Requires-Dist: requests-toolbelt
27
27
  Requires-Dist: six>=1.9
28
28
  Requires-Dist: certifi
29
29
  Requires-Dist: python-dateutil
30
+ Provides-Extra: test
31
+ Requires-Dist: coverage; extra == "test"
32
+ Requires-Dist: coveralls; extra == "test"
33
+ Requires-Dist: pytest; extra == "test"
30
34
  Provides-Extra: develop
31
35
  Requires-Dist: coverage; extra == "develop"
32
36
  Requires-Dist: coveralls[yaml]; extra == "develop"
33
37
  Requires-Dist: pytest; extra == "develop"
34
38
  Requires-Dist: pytest-instafail; extra == "develop"
35
- Provides-Extra: test
36
- Requires-Dist: coverage; extra == "test"
37
- Requires-Dist: coveralls; extra == "test"
38
- Requires-Dist: pytest; extra == "test"
39
+ Dynamic: author
40
+ Dynamic: author-email
41
+ Dynamic: classifier
42
+ Dynamic: description
43
+ Dynamic: description-content-type
44
+ Dynamic: home-page
45
+ Dynamic: keywords
46
+ Dynamic: license
47
+ Dynamic: license-file
48
+ Dynamic: provides-extra
49
+ Dynamic: requires-dist
50
+ Dynamic: summary
39
51
 
40
52
  # Smartsheet Python SDK
41
53
 
@@ -16,7 +16,7 @@ smartsheet/reports.py,sha256=0B5bdQwVJHwu-V04aMSJ-Y7HaILK4rgjjMtn0--kcig,12835
16
16
  smartsheet/search.py,sha256=ffy1dkVl3GtuYgCxvuR-vwahOBWIehGv_zwzLoJMimA,3394
17
17
  smartsheet/server.py,sha256=9wySsa_y_G-VO88tEHGHp919zRVFS0kCFIhiM6crWEU,1429
18
18
  smartsheet/session.py,sha256=TQ3IgVZ64r7Dszwo8rMISFezWxuwFYshhW9QhzoA428,2125
19
- smartsheet/sharing.py,sha256=vonbDFD5nXrhcRTjTdBmZVZs4TB1BWVk2eOJslydmUE,5857
19
+ smartsheet/sharing.py,sha256=pYQdYuZy5ZJdaPhh1monaYfyQQOOcTi_lQuHM0xzsnQ,5882
20
20
  smartsheet/sheets.py,sha256=2SUhanCsRFKCsbN-oAIRMsuYnk1aSFlXKzfZhxMo7d0,70603
21
21
  smartsheet/sights.py,sha256=IZgy8CJZBJ-pQo6vNwkDSBuoLCv5RAW39kNUMMNJ-oc,11569
22
22
  smartsheet/smartsheet.py,sha256=bx5uAH6sH5SXBui2XILuNsFo06lnc8Z8_eo1Uzzd6as,24454
@@ -25,14 +25,15 @@ smartsheet/token.py,sha256=5uz-IG5adx_zr2-uepH-W8ATv0dq9aZNjYLeZNwldqI,4703
25
25
  smartsheet/types.py,sha256=aIdRJ89jwclmiZ4RH3hnZHJTFWFxgNKW3d8fghm21eM,9126
26
26
  smartsheet/users.py,sha256=1KnqKJIzJEPMNy26BQY1b9jb3dItbzglrljV1MGD5ic,15887
27
27
  smartsheet/util.py,sha256=12Y6eluecB8k4Ns-at81AEM18ND2TCKa9bF4BlNRrKM,5633
28
- smartsheet/version.py,sha256=OQ0f_DFwVp2oC6nqaYeOMvAmplmRtX58iNhel24HEag,160
28
+ smartsheet/version.py,sha256=Q-oBfvZWrWFX-8jA5kX5-ds0o8av3Q3YcwJYvLxKEb0,160
29
29
  smartsheet/webhooks.py,sha256=7F7g4Ks0GyS3QxsNWm1SFtrOr00jBisCjj7-hcToHM8,4637
30
30
  smartsheet/workspaces.py,sha256=r81xh3HfYsX--ll5pQ-h7kSSJELokYV-bSjuD0WloeU,22651
31
- smartsheet/models/__init__.py,sha256=lH951xll0kO3GA6CrgW4UgMOcXu2x7BjvZBFQfpgqKY,4824
31
+ smartsheet/models/__init__.py,sha256=wJter68K1D2T3Noq4r7SooPhahtdkJBKIrrUwJxymNQ,4860
32
32
  smartsheet/models/access_token.py,sha256=sKHL5cFRWPTjymX06ZIXaCDp8ZJQEVpXN8mns1DAvGM,2564
33
33
  smartsheet/models/account.py,sha256=nLg_5O4Vnc7aNf9p1kIcsgdAm23IC2H7cKkxjLxwS9U,1941
34
34
  smartsheet/models/alternate_email.py,sha256=n8zqWkY-uzSw_CVKBvYUc6pGSR0v4yTx8S5PaIiX_AU,2263
35
- smartsheet/models/asset_shares_paginated_result.py,sha256=kSee44-T_7hn-hz7kgKAVAa6vFs06IhFQ7AIpohe7WE,2531
35
+ smartsheet/models/asset_share.py,sha256=e3xud8bkK6ep8JljCp6v7AmIKpqZIyBPodEOWbE-WwA,3398
36
+ smartsheet/models/asset_shares_paginated_result.py,sha256=lvFOAjclocin_8AQENflaX9W-cRlCmUqaAVTpb2v7Hc,2552
36
37
  smartsheet/models/attachment.py,sha256=5DgnZ4fj19rtIgN3INqlP0zYh8JNa0DRleeAS52tQ2o,4684
37
38
  smartsheet/models/auto_number_format.py,sha256=LRNIkasbspWKJFg0hwMvhSe4HmuuNRrvH_jerCbKooM,2091
38
39
  smartsheet/models/automation_action.py,sha256=_1cb_ubhR4Xx56UNGi3dLXdfoBkA7oyjDWu2wA98p-Q,4526
@@ -186,57 +187,9 @@ smartsheet/models/enums/system_column_type.py,sha256=UfhNUBGD_0K1Pas7fujGEuax55O
186
187
  smartsheet/models/enums/update_request_status.py,sha256=xYF84x1dTFhJMYVi1q3G1T9u1IGN3szlR1jj5HHC0hE,777
187
188
  smartsheet/models/enums/user_status.py,sha256=SB7qRcA0dhdRimsOKHCGF3CB6fL0XuifxQEWZGNNS8Q,766
188
189
  smartsheet/models/enums/widget_type.py,sha256=VfVq59fLZsT4ks_ZBrtv52u2Cl60iAdlA6mGD_elz-k,1072
189
- tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
190
- tests/integration/README.md,sha256=URfm5x5IdE---oMkO3vMePPJ8ZdESJTvPzMdjzv6TnY,1352
191
- tests/integration/conftest.py,sha256=8YxuffY8hOZ1NtU7mw95-H6i5wcChxJIketxIO6OrD0,5275
192
- tests/integration/test_attachments.py,sha256=3MxrAa05CRCgPqNu2W5m0Arum1oJAdEO7LhBwhF0q80,3631
193
- tests/integration/test_columns.py,sha256=noHTyMKjq8vMIgkh033YQEkXiY52nxAmp-Mto36Jv4E,2951
194
- tests/integration/test_contacts.py,sha256=uN3qSeuhId0x5MinvsKXgRyPaDHL1NLH7CccXWtZ4FY,910
195
- tests/integration/test_cross_sheet_references.py,sha256=RqiTayGNlIXLqNT3OQbk3zcCcX4HlLnKwTJbSDNb_OE,1330
196
- tests/integration/test_discussions.py,sha256=9ltns9SN73be0WVGi38PCLzwKLX5qxmbHP7mmDgBiEg,7370
197
- tests/integration/test_events.py,sha256=pMMoywNP1xDiGkCJm0ImM2p2jYN0buB6PLP4R4xP_7c,2582
198
- tests/integration/test_favorites.py,sha256=NhoqXhcZu2vNkXex3ZaSXSPOdMPx-AyMztu3_6NUjcM,1130
199
- tests/integration/test_folders.py,sha256=2ZoMCerrIkx9IGd7izhDORDy2RjeGyGenFkGZrLzZlY,5200
200
- tests/integration/test_groups.py,sha256=vWwreXgiuxlOolD0MgNKHn2ANTH3avuLH7U6xZlkvUQ,2846
201
- tests/integration/test_home.py,sha256=a95auUi1rggg2oS6dXxyL5GgEr0VvYfv9RrmM0NbDpk,3449
202
- tests/integration/test_model_attributes.py,sha256=vcF89w8E6x3Ir5WnUqNwyM6Zp2wDFfkEm1ZOkHdnxlE,100219
203
- tests/integration/test_multi_picklist.py,sha256=xHlbxtpmk_vTwisJ57M6U3bMeQtnea2KVC5YwO48SXs,2537
204
- tests/integration/test_object_value.py,sha256=mCmFwGoN0t3D8wXiZ63dzlPDPciWtSUDNVUYhpBFEBc,4224
205
- tests/integration/test_passthrough.py,sha256=vRg9OTBb-y7u5p25fjYnQSKGbSZcanSzReesaVqwYEc,1603
206
- tests/integration/test_regression.py,sha256=KOMP6vqAVFrN_UCAKD90V3s0eGpWSsUxxphHRFBOAFs,8208
207
- tests/integration/test_reports.py,sha256=37iTenbbnCP0p2I9UzbQoWwjF4eFFGrBRlSnop0N1FQ,4712
208
- tests/integration/test_rows.py,sha256=MNzLZOHSBZGWslC8peuD9p_dQ9Jj_V3QHN6C16u4BJY,7596
209
- tests/integration/test_server_info.py,sha256=atoRjGEFwbja51wyui_5-CeiK27-xLTvQXl4-nUA810,268
210
- tests/integration/test_sharing.py,sha256=XuMCybgDyZaudEiomOV-XbP-kLY8lY4xfp7Uc-gYREY,2694
211
- tests/integration/test_sheet_summary.py,sha256=siRtHTZVLaCV3dDrcpApXHLSWmnpncQdMm7OTlk_f6s,3357
212
- tests/integration/test_sheets.py,sha256=hL5C_hs8y2FyoGBaKcQDsll2RCQeqdFQoGGcDc9BFyQ,14531
213
- tests/integration/test_templates.py,sha256=vbgxkPkO0DzZ4AfA5wecUKYLQ7Dm_Qux7HB7TxQmWvQ,799
214
- tests/integration/test_update_requests.py,sha256=Qx-jRLCbTnoJG48J98OzB7g8f8IRmNISiqQNwsArZo4,2726
215
- tests/integration/test_users.py,sha256=SLWU0D-QfCAp3ymgBoySq_8svet5L31H7WCH9eBaQ5w,4609
216
- tests/integration/test_webhooks.py,sha256=5pDyfv3BREscXHk7AUOrLDlvsQIZHvPcW6dvZfVI2Hg,1901
217
- tests/integration/test_workspaces.py,sha256=Xn7mAi0dOIPHZE7Qnff1K16X1FYTc7CbdYims8NIEus,11202
218
- tests/integration/test_zsearch.py,sha256=fUCCYO25dfX_aby6VVJVpGWsI_-9c-dO__cnRmcPAfI,1101
219
- tests/integration/fixtures/calling_all_curs.txt,sha256=w6y8iLcnN7Cr2qzTW85n-Y0piB7TWNCJBzYBeC85gNM,61
220
- tests/integration/fixtures/curly.jpg,sha256=EAgX6jplNdLuy12xTPR_IUO8aBd4FH0wBojP_j8qnKo,17988
221
- tests/integration/fixtures/moe-curly.jpg,sha256=GeM6RLaXEaAU92RC7pP6kCoO84VPS72qB3Al2reZ9-4,65440
222
- tests/integration/fixtures/quote.txt,sha256=mC4gL6QbbtpBUXDJHUV7JJNbe0lZRDehuhi05ejYBKk,20
223
- tests/integration/fixtures/stooges_v1.jpg,sha256=6_FT9q2QK9yxymbhS5c_e8gx6PQnwXj2Z83X47ZP9hc,90832
224
- tests/integration/fixtures/stooges_v2.jpg,sha256=MSUu7Uh2rTjlnjXgvQFn4s8hErUD5AqbyO0AzMfntJg,30550
225
- tests/mock_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
226
- tests/mock_api/mock_api_test_helper.py,sha256=6Kmp0yrA68gOTItiHEhHYhqh3LpGnqV_5O3DNgw2tdY,2191
227
- tests/mock_api/test_mock_api_automation_rules.py,sha256=tEsSkFRF9frJciXD7y_A3T1QF5NFLb6HUC_34Q4gcDc,1609
228
- tests/mock_api/test_mock_api_columns.py,sha256=9-jvgluH5hWyNEKgfPIB5nPtW40KjD6Q7GUr-EzcMis,1490
229
- tests/mock_api/test_mock_api_folders.py,sha256=MUDeVv0rn5vAs6GDtrKfIaap-jBO-syoy5MBb2vYJ0E,6755
230
- tests/mock_api/test_mock_api_rows.py,sha256=2xNqQsvqnk4T_dsWrmu1BPVhNvTlb_gffClaz_LIbpg,20972
231
- tests/mock_api/test_mock_api_sharing.py,sha256=6psgcUXvc2nCq3OS1M9-pQ0YJZmhVDs2pCYAmvgzF_U,15085
232
- tests/mock_api/test_mock_api_sheets.py,sha256=61mhb0iUnR8j4_5XTrfI9aQHOGGX3RTc3tGsn8G0V2k,1225
233
- tests/mock_api/test_mock_api_sights.py,sha256=UazPkjGu2UnT_dRz189v1DMhMBDeTRKtWxux6aYao2k,2203
234
- tests/mock_api/test_mock_api_workspaces.py,sha256=8QzRrkRoenCCD5tB5crmpGzXNmSP9kLjEUU046DJ1AE,9419
235
- tests/mock_api/test_mock_change_agent.py,sha256=WDd6MKERhqGQJ3QrTQK5ylXMhZ65o5vnhscBlisFjoM,757
236
- tests/mock_api/test_mock_serialization.py,sha256=0veKtirhYve8BZL8M3yPuREpw-a8TzYK7tH7aLD7LqQ,18174
237
- smartsheet_python_sdk-3.5.2.dist-info/LICENSE.md,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
238
- smartsheet_python_sdk-3.5.2.dist-info/METADATA,sha256=tbNMz9R8y4hJo70xPGAQv2bWvOtLz_WojhK0Wv_A-hs,4734
239
- smartsheet_python_sdk-3.5.2.dist-info/NOTICE,sha256=mXr2ryVjnCjykeW0J79kFfVXQG_Z9SV4BV_QPNENW1U,420
240
- smartsheet_python_sdk-3.5.2.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
241
- smartsheet_python_sdk-3.5.2.dist-info/top_level.txt,sha256=ACM1Ryc7rQRwrJIuN7H4aEMO-wUGjiYQshvRPoiOYT4,17
242
- smartsheet_python_sdk-3.5.2.dist-info/RECORD,,
190
+ smartsheet_python_sdk-3.5.4.dist-info/licenses/LICENSE.md,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
191
+ smartsheet_python_sdk-3.5.4.dist-info/licenses/NOTICE,sha256=mXr2ryVjnCjykeW0J79kFfVXQG_Z9SV4BV_QPNENW1U,420
192
+ smartsheet_python_sdk-3.5.4.dist-info/METADATA,sha256=XFB6uYBzqY69rrNpzoFlnbNyj-NjPqapZe4WzO3SYlE,4987
193
+ smartsheet_python_sdk-3.5.4.dist-info/WHEEL,sha256=AeO2BvogYWm3eGaHCvhzmUYt8ia7KfURiHzO_1atlys,109
194
+ smartsheet_python_sdk-3.5.4.dist-info/top_level.txt,sha256=kozWEYiKjyJmSXzd6p5ugkQ5bhoHS9V3NnvLagUfcNw,11
195
+ smartsheet_python_sdk-3.5.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.45.1)
2
+ Generator: setuptools (79.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any
tests/__init__.py DELETED
File without changes
@@ -1,37 +0,0 @@
1
- # smartsheet-python-sdk unit tests
2
-
3
- ## Setup
4
-
5
- From the root directory of this repository:
6
-
7
- ```python
8
- python setup.py develop
9
- ```
10
-
11
- ## Running the tests
12
-
13
- Again, from the root directory of this repository:
14
-
15
- ```python
16
- python setup.py test
17
- ```
18
-
19
- ## Requirements
20
-
21
- Some tests carry requirements. We're testing the real service here, not just using mocks. In order to do that, some configuration is necessary for some tests.
22
-
23
- The test suite expects these environment variables to be present:
24
-
25
- ```shell
26
- export SMARTSHEET_ACCESS_TOKEN="SSSSSSSSSSSSSSSSSSSSSSSSSS"
27
- export LOG_CFG="debug" # optional
28
- export SMARTSHEET_FIXTURE_USERS='{"admin":{"id":9999999999999999},"larry":{"id":0000000000000000},"curly":{"id":1111111111111111},"moe":{"id":2222222222222222}}'
29
- ```
30
-
31
- **Please note:** the user nicknames (admin, larry, curly, moe) are not essential. However, valid IDs of users within the Smartsheet organization the access token belongs to are required.
32
-
33
- In addition, reports tests will be skipped unless there is a report within the organization. The report will not be modified or deleted, but must exist in order to acceptance-test the API methods pertaining to Reports.
34
-
35
- The `admin` user needs at least one Contact.
36
-
37
- Finally, the user corresponding to `moe` needs to be a Licensed User. `larry` and `curly` do not need to be Licensed Users.
@@ -1,174 +0,0 @@
1
- import pytest
2
- import smartsheet
3
- from datetime import datetime
4
- from dateutil.tz import *
5
- import json
6
- import os
7
- import six
8
-
9
-
10
- @pytest.fixture(scope="module")
11
- def smart_setup(request):
12
- # set up a test session folder with basic starting points
13
- smart = smartsheet.Smartsheet(max_retry_time=60)
14
- now = datetime.now(tzlocal()).strftime("%Y-%m-%d %H:%M:%S")
15
-
16
- users = os.environ.get('SMARTSHEET_FIXTURE_USERS', None)
17
- if users is None:
18
- pytest.exit('Environment not setup correctly...aborting')
19
-
20
- users = json.loads(users)
21
- fixusers = {}
22
- for nick,info in six.iteritems(users):
23
- profile = smart.Users.get_user(info['id'])
24
- assert isinstance(profile, smart.models.UserProfile)
25
- fixusers[nick] = profile
26
- action = smart.Groups.list_groups(include_all=True)
27
- assert isinstance(action, smart.models.IndexResult)
28
- grps = action.result
29
- groups = {}
30
- need_exec = True
31
- for gp in grps:
32
- groups[gp.name] = gp
33
- if gp.name == 'exec':
34
- need_exec = False
35
-
36
- if need_exec:
37
- group = smart.models.Group({
38
- 'name': 'exec',
39
- 'members': [
40
- smart.models.GroupMember({
41
- 'email': fixusers['moe'].email
42
- }),
43
- smart.models.GroupMember({
44
- 'email': fixusers['admin'].email
45
- })
46
- ]
47
- })
48
- action = smart.Groups.create_group(group)
49
- assert action.message == 'SUCCESS'
50
-
51
- # test run base folders
52
- folder_name = 'pytest ' + now
53
- action = smart.Home.create_folder(folder_name)
54
- assert action.message == 'SUCCESS'
55
- test_folder = action.result
56
-
57
- # add a sheet to mess around with
58
- sheet = smart.models.Sheet({
59
- 'name': 'pytest_fixture_sheet ' + now,
60
- 'columns': [{
61
- 'title': 'The First Column',
62
- 'primary': True,
63
- 'type': 'TEXT_NUMBER'
64
- }, {
65
- 'title': 'Favorite',
66
- 'type': 'CHECKBOX',
67
- 'symbol': 'STAR'
68
- }, {
69
- 'title': 'Disposable',
70
- 'type': 'TEXT_NUMBER'
71
- }]
72
- })
73
- action = smart.Folders.create_sheet_in_folder(test_folder.id, sheet)
74
- assert action.message == 'SUCCESS'
75
- sheet = action.result
76
-
77
- # get primary column id
78
- for idx, col in enumerate(sheet.columns):
79
- if col.primary:
80
- break
81
- sheet_primary_col = col
82
-
83
- # add a row
84
- action = sheet.add_rows([smart.models.Row({
85
- 'to_top': True,
86
- 'cells': [{
87
- 'column_id': sheet_primary_col.id,
88
- 'value': 'The first column of the first row.'
89
- }]
90
- })])
91
- assert action.message == 'SUCCESS'
92
-
93
- sheet = smart.Sheets.get_sheet(sheet.id)
94
- assert isinstance(sheet, smart.models.Sheet)
95
-
96
- sheet_b = smart.models.Sheet({
97
- 'name': 'pytest_fixture_sheetB ' + now,
98
- 'columns': [{
99
- 'title': 'Brand',
100
- 'primary': True,
101
- 'type': 'TEXT_NUMBER'
102
- }]
103
- })
104
- action = smart.Folders.create_sheet_in_folder(test_folder.id, sheet_b)
105
- assert action.message == 'SUCCESS'
106
- sheet_b = action.result
107
- for idx, col in enumerate(sheet_b.columns):
108
- if col.primary:
109
- break
110
- sheet_b_primary_col = col
111
-
112
- action = sheet_b.add_rows([
113
- smart.models.Row({
114
- 'to_top': True,
115
- 'cells': [{
116
- 'column_id': sheet_b_primary_col.id,
117
- 'value': 'Nike'
118
- }]
119
- }),
120
- smart.models.Row({
121
- 'to_top': True,
122
- 'cells': [{
123
- 'column_id': sheet_b_primary_col.id,
124
- 'value': 'Google'
125
- }]
126
- }),
127
- smart.models.Row({
128
- 'to_top': True,
129
- 'cells': [{
130
- 'column_id': sheet_b_primary_col.id,
131
- 'value': 'Adidas'
132
- }]
133
- }),
134
- smart.models.Row({
135
- 'to_top': True,
136
- 'cells': [{
137
- 'column_id': sheet_b_primary_col.id,
138
- 'value': 'Keen'
139
- }]
140
- })])
141
- assert action.message == 'SUCCESS'
142
-
143
- sheet_b = smart.Sheets.get_sheet(sheet_b.id)
144
- assert isinstance(sheet_b, smart.models.Sheet)
145
-
146
- fixture = {
147
- 'smart': smart,
148
- 'folder': test_folder,
149
- 'sheet': sheet,
150
- 'sheet_primary_col': sheet_primary_col,
151
- 'sheet_b': sheet_b,
152
- 'sheet_b_primary_col': sheet_b_primary_col,
153
- 'now': now,
154
- 'users': fixusers,
155
- 'groups': groups
156
- }
157
-
158
- def smart_teardown():
159
- action = fixture['smart'].Sheets.delete_sheet(fixture['sheet'].id)
160
- assert action.message == 'SUCCESS'
161
- print("deleted fixture sheet")
162
- action = fixture['smart'].Sheets.delete_sheet(fixture['sheet_b'].id)
163
- assert action.message == 'SUCCESS'
164
- print("deleted fixture sheet_b")
165
- action = fixture['smart'].Folders.delete_folder(fixture['folder'].id)
166
- assert action.message == 'SUCCESS'
167
- print("deleted fixture folder")
168
- if 'folder_b' in fixture:
169
- action = fixture['smart'].Folders.delete_folder(fixture['folder_b'].id)
170
- assert action.message == 'SUCCESS'
171
- print("deleted fixture folder_b")
172
-
173
- request.addfinalizer(smart_teardown)
174
- return fixture
@@ -1 +0,0 @@
1
- Curly: "Hmmm, n'yuk, n'yuk, n'yuk. He must be a Pointsetter!"
Binary file
Binary file
@@ -1 +0,0 @@
1
- n'yuk, n'yuk, n'yuk!
Binary file
Binary file