|
@@ -155,7 +155,7 @@ class TestWorkspaceMembersEndpoint(FunctionalTest):
|
155
|
155
|
res = self.testapp.get('/api/v2/workspaces/1/members', status=200).json_body # nopep8
|
156
|
156
|
assert len(res) == 1
|
157
|
157
|
user_role = res[0]
|
158
|
|
- assert user_role['role_slug'] == 'workspace-manager'
|
|
158
|
+ assert user_role['role'] == 'workspace-manager'
|
159
|
159
|
assert user_role['user_id'] == 1
|
160
|
160
|
assert user_role['workspace_id'] == 1
|
161
|
161
|
assert user_role['user']['display_name'] == 'Global manager'
|
|
@@ -246,7 +246,7 @@ class TestWorkspaceContents(FunctionalTest):
|
246
|
246
|
assert content['parent_id'] is None
|
247
|
247
|
assert content['show_in_ui'] is True
|
248
|
248
|
assert content['slug'] == 'tools'
|
249
|
|
- assert content['status_slug'] == 'open'
|
|
249
|
+ assert content['status'] == 'open'
|
250
|
250
|
assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'} # nopep8
|
251
|
251
|
assert content['workspace_id'] == 1
|
252
|
252
|
content = res[1]
|
|
@@ -257,7 +257,7 @@ class TestWorkspaceContents(FunctionalTest):
|
257
|
257
|
assert content['parent_id'] is None
|
258
|
258
|
assert content['show_in_ui'] is True
|
259
|
259
|
assert content['slug'] == 'menus'
|
260
|
|
- assert content['status_slug'] == 'open'
|
|
260
|
+ assert content['status'] == 'open'
|
261
|
261
|
assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'} # nopep8
|
262
|
262
|
assert content['workspace_id'] == 1
|
263
|
263
|
content = res[2]
|
|
@@ -268,7 +268,7 @@ class TestWorkspaceContents(FunctionalTest):
|
268
|
268
|
assert content['parent_id'] == 2
|
269
|
269
|
assert content['show_in_ui'] is True
|
270
|
270
|
assert content['slug'] == 'current-menu'
|
271
|
|
- assert content['status_slug'] == 'open'
|
|
271
|
+ assert content['status'] == 'open'
|
272
|
272
|
assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'} # nopep8
|
273
|
273
|
assert content['workspace_id'] == 1
|
274
|
274
|
|
|
@@ -307,7 +307,7 @@ class TestWorkspaceContents(FunctionalTest):
|
307
|
307
|
assert content['parent_id'] is None
|
308
|
308
|
assert content['show_in_ui'] is True
|
309
|
309
|
assert content['slug'] == 'new-fruit-salad'
|
310
|
|
- assert content['status_slug'] == 'open'
|
|
310
|
+ assert content['status'] == 'open'
|
311
|
311
|
assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'} # nopep8
|
312
|
312
|
assert content['workspace_id'] == 3
|
313
|
313
|
|
|
@@ -320,7 +320,7 @@ class TestWorkspaceContents(FunctionalTest):
|
320
|
320
|
assert content['parent_id'] is None
|
321
|
321
|
assert content['show_in_ui'] is True
|
322
|
322
|
assert content['slug'].startswith('fruit-salad')
|
323
|
|
- assert content['status_slug'] == 'open'
|
|
323
|
+ assert content['status'] == 'open'
|
324
|
324
|
assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'} # nopep8
|
325
|
325
|
assert content['workspace_id'] == 3
|
326
|
326
|
|
|
@@ -333,7 +333,7 @@ class TestWorkspaceContents(FunctionalTest):
|
333
|
333
|
assert content['parent_id'] is None
|
334
|
334
|
assert content['show_in_ui'] is True
|
335
|
335
|
assert content['slug'].startswith('bad-fruit-salad')
|
336
|
|
- assert content['status_slug'] == 'open'
|
|
336
|
+ assert content['status'] == 'open'
|
337
|
337
|
assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'} # nopep8
|
338
|
338
|
assert content['workspace_id'] == 3
|
339
|
339
|
|
|
@@ -370,7 +370,7 @@ class TestWorkspaceContents(FunctionalTest):
|
370
|
370
|
assert content['parent_id'] is None
|
371
|
371
|
assert content['show_in_ui'] is True
|
372
|
372
|
assert content['slug'] == 'new-fruit-salad'
|
373
|
|
- assert content['status_slug'] == 'open'
|
|
373
|
+ assert content['status'] == 'open'
|
374
|
374
|
assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'} # nopep8
|
375
|
375
|
assert content['workspace_id'] == 3
|
376
|
376
|
|
|
@@ -406,7 +406,7 @@ class TestWorkspaceContents(FunctionalTest):
|
406
|
406
|
assert content['parent_id'] is None
|
407
|
407
|
assert content['show_in_ui'] is True
|
408
|
408
|
assert content['slug'].startswith('fruit-salad')
|
409
|
|
- assert content['status_slug'] == 'open'
|
|
409
|
+ assert content['status'] == 'open'
|
410
|
410
|
assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'} # nopep8
|
411
|
411
|
assert content['workspace_id'] == 3
|
412
|
412
|
|
|
@@ -444,7 +444,7 @@ class TestWorkspaceContents(FunctionalTest):
|
444
|
444
|
assert content['parent_id'] is None
|
445
|
445
|
assert content['show_in_ui'] is True
|
446
|
446
|
assert content['slug'].startswith('bad-fruit-salad')
|
447
|
|
- assert content['status_slug'] == 'open'
|
|
447
|
+ assert content['status'] == 'open'
|
448
|
448
|
assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'} # nopep8
|
449
|
449
|
assert content['workspace_id'] == 3
|
450
|
450
|
|
|
@@ -508,7 +508,7 @@ class TestWorkspaceContents(FunctionalTest):
|
508
|
508
|
assert content['parent_id'] == 10
|
509
|
509
|
assert content['show_in_ui'] is True
|
510
|
510
|
assert content['slug'] == 'new-fruit-salad'
|
511
|
|
- assert content['status_slug'] == 'open'
|
|
511
|
+ assert content['status'] == 'open'
|
512
|
512
|
assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'} # nopep8
|
513
|
513
|
assert content['workspace_id'] == 2
|
514
|
514
|
|
|
@@ -521,7 +521,7 @@ class TestWorkspaceContents(FunctionalTest):
|
521
|
521
|
assert content['parent_id'] == 10
|
522
|
522
|
assert content['show_in_ui'] is True
|
523
|
523
|
assert content['slug'].startswith('fruit-salad')
|
524
|
|
- assert content['status_slug'] == 'open'
|
|
524
|
+ assert content['status'] == 'open'
|
525
|
525
|
assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'} # nopep8
|
526
|
526
|
assert content['workspace_id'] == 2
|
527
|
527
|
|
|
@@ -534,7 +534,7 @@ class TestWorkspaceContents(FunctionalTest):
|
534
|
534
|
assert content['parent_id'] == 10
|
535
|
535
|
assert content['show_in_ui'] is True
|
536
|
536
|
assert content['slug'].startswith('bad-fruit-salad')
|
537
|
|
- assert content['status_slug'] == 'open'
|
|
537
|
+ assert content['status'] == 'open'
|
538
|
538
|
assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'} # nopep8
|
539
|
539
|
assert content['workspace_id'] == 2
|
540
|
540
|
|
|
@@ -570,7 +570,7 @@ class TestWorkspaceContents(FunctionalTest):
|
570
|
570
|
assert content['parent_id'] == 10
|
571
|
571
|
assert content['show_in_ui'] is True
|
572
|
572
|
assert content['slug'] == 'new-fruit-salad'
|
573
|
|
- assert content['status_slug'] == 'open'
|
|
573
|
+ assert content['status'] == 'open'
|
574
|
574
|
assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'} # nopep8
|
575
|
575
|
assert content['workspace_id'] == 2
|
576
|
576
|
|
|
@@ -606,7 +606,7 @@ class TestWorkspaceContents(FunctionalTest):
|
606
|
606
|
assert content['parent_id'] == 10
|
607
|
607
|
assert content['show_in_ui'] is True
|
608
|
608
|
assert content['slug'].startswith('fruit-salad')
|
609
|
|
- assert content['status_slug'] == 'open'
|
|
609
|
+ assert content['status'] == 'open'
|
610
|
610
|
assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'} # nopep8
|
611
|
611
|
assert content['workspace_id'] == 2
|
612
|
612
|
|
|
@@ -643,7 +643,7 @@ class TestWorkspaceContents(FunctionalTest):
|
643
|
643
|
assert content['parent_id'] == 10
|
644
|
644
|
assert content['show_in_ui'] is True
|
645
|
645
|
assert content['slug'].startswith('bad-fruit-salad')
|
646
|
|
- assert content['status_slug'] == 'open'
|
|
646
|
+ assert content['status'] == 'open'
|
647
|
647
|
assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'} # nopep8
|
648
|
648
|
assert content['workspace_id'] == 2
|
649
|
649
|
|
|
@@ -750,7 +750,7 @@ class TestWorkspaceContents(FunctionalTest):
|
750
|
750
|
)
|
751
|
751
|
assert res
|
752
|
752
|
assert res.json_body
|
753
|
|
- assert res.json_body['status_slug'] == 'open'
|
|
753
|
+ assert res.json_body['status'] == 'open'
|
754
|
754
|
assert res.json_body['id']
|
755
|
755
|
assert res.json_body['content_type'] == 'markdownpage'
|
756
|
756
|
assert res.json_body['is_archived'] is False
|