|
@@ -138,6 +138,27 @@ class TestWorkspaceEndpoint(FunctionalTest):
|
138
|
138
|
assert workspace['description'] == 'mysuperdescription'
|
139
|
139
|
assert len(workspace['sidebar_entries']) == 7
|
140
|
140
|
|
|
141
|
+ def test_api__update_workspace__err_400__empty_label(self) -> None:
|
|
142
|
+ """
|
|
143
|
+ Test update workspace with empty label
|
|
144
|
+ """
|
|
145
|
+ self.testapp.authorization = (
|
|
146
|
+ 'Basic',
|
|
147
|
+ (
|
|
148
|
+ 'admin@admin.admin',
|
|
149
|
+ 'admin@admin.admin'
|
|
150
|
+ )
|
|
151
|
+ )
|
|
152
|
+ params = {
|
|
153
|
+ 'label': '',
|
|
154
|
+ 'description': 'mysuperdescription'
|
|
155
|
+ }
|
|
156
|
+ res = self.testapp.put_json(
|
|
157
|
+ '/api/v2/workspaces/1',
|
|
158
|
+ status=400,
|
|
159
|
+ params=params,
|
|
160
|
+ )
|
|
161
|
+
|
141
|
162
|
def test_api__create_workspace__ok_200__nominal_case(self) -> None:
|
142
|
163
|
"""
|
143
|
164
|
Test create workspace
|
|
@@ -168,6 +189,27 @@ class TestWorkspaceEndpoint(FunctionalTest):
|
168
|
189
|
workspace_2 = res.json_body
|
169
|
190
|
assert workspace == workspace_2
|
170
|
191
|
|
|
192
|
+ def test_api__create_workspace__err_400__empty_label(self) -> None:
|
|
193
|
+ """
|
|
194
|
+ Test create workspace with empty label
|
|
195
|
+ """
|
|
196
|
+ self.testapp.authorization = (
|
|
197
|
+ 'Basic',
|
|
198
|
+ (
|
|
199
|
+ 'admin@admin.admin',
|
|
200
|
+ 'admin@admin.admin'
|
|
201
|
+ )
|
|
202
|
+ )
|
|
203
|
+ params = {
|
|
204
|
+ 'label': '',
|
|
205
|
+ 'description': 'mysuperdescription'
|
|
206
|
+ }
|
|
207
|
+ res = self.testapp.post_json(
|
|
208
|
+ '/api/v2/workspaces',
|
|
209
|
+ status=400,
|
|
210
|
+ params=params,
|
|
211
|
+ )
|
|
212
|
+
|
171
|
213
|
def test_api__get_workspace__err_400__unallowed_user(self) -> None:
|
172
|
214
|
"""
|
173
|
215
|
Check obtain workspace unreachable for user
|