|
@@ -643,7 +643,9 @@ class TestWorkspaceContents(FunctionalTest):
|
643
|
643
|
assert content['show_in_ui'] is True
|
644
|
644
|
assert content['slug'] == 'tools'
|
645
|
645
|
assert content['status'] == 'open'
|
646
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
646
|
+ assert len(content['sub_content_types']) > 1
|
|
647
|
+ assert 'comment' in content['sub_content_types']
|
|
648
|
+ assert 'folder' in content['sub_content_types']
|
647
|
649
|
assert content['workspace_id'] == 1
|
648
|
650
|
content = res[1]
|
649
|
651
|
assert content['content_id'] == 2
|
|
@@ -655,7 +657,9 @@ class TestWorkspaceContents(FunctionalTest):
|
655
|
657
|
assert content['show_in_ui'] is True
|
656
|
658
|
assert content['slug'] == 'menus'
|
657
|
659
|
assert content['status'] == 'open'
|
658
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
660
|
+ assert len(content['sub_content_types']) > 1
|
|
661
|
+ assert 'comment' in content['sub_content_types']
|
|
662
|
+ assert 'folder' in content['sub_content_types']
|
659
|
663
|
assert content['workspace_id'] == 1
|
660
|
664
|
content = res[2]
|
661
|
665
|
assert content['content_id'] == 11
|
|
@@ -667,7 +671,7 @@ class TestWorkspaceContents(FunctionalTest):
|
667
|
671
|
assert content['show_in_ui'] is True
|
668
|
672
|
assert content['slug'] == 'current-menu'
|
669
|
673
|
assert content['status'] == 'open'
|
670
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
674
|
+ assert set(content['sub_content_types']) == {'comment'}
|
671
|
675
|
assert content['workspace_id'] == 1
|
672
|
676
|
|
673
|
677
|
def test_api__get_workspace_content__ok_200__get_default_html_documents(self):
|
|
@@ -697,7 +701,7 @@ class TestWorkspaceContents(FunctionalTest):
|
697
|
701
|
assert content['show_in_ui'] is True
|
698
|
702
|
assert content['slug'] == 'current-menu'
|
699
|
703
|
assert content['status'] == 'open'
|
700
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
704
|
+ assert set(content['sub_content_types']) == {'comment'}
|
701
|
705
|
assert content['workspace_id'] == 1
|
702
|
706
|
|
703
|
707
|
# Root related
|
|
@@ -736,7 +740,7 @@ class TestWorkspaceContents(FunctionalTest):
|
736
|
740
|
assert content['show_in_ui'] is True
|
737
|
741
|
assert content['slug'] == 'new-fruit-salad'
|
738
|
742
|
assert content['status'] == 'open'
|
739
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
743
|
+ assert set(content['sub_content_types']) == {'comment'}
|
740
|
744
|
assert content['workspace_id'] == 3
|
741
|
745
|
|
742
|
746
|
content = res[2]
|
|
@@ -749,7 +753,7 @@ class TestWorkspaceContents(FunctionalTest):
|
749
|
753
|
assert content['show_in_ui'] is True
|
750
|
754
|
assert content['slug'].startswith('fruit-salad')
|
751
|
755
|
assert content['status'] == 'open'
|
752
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
756
|
+ assert set(content['sub_content_types']) == {'comment'}
|
753
|
757
|
assert content['workspace_id'] == 3
|
754
|
758
|
|
755
|
759
|
content = res[3]
|
|
@@ -762,7 +766,7 @@ class TestWorkspaceContents(FunctionalTest):
|
762
|
766
|
assert content['show_in_ui'] is True
|
763
|
767
|
assert content['slug'].startswith('bad-fruit-salad')
|
764
|
768
|
assert content['status'] == 'open'
|
765
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
769
|
+ assert set(content['sub_content_types']) == {'comment'}
|
766
|
770
|
assert content['workspace_id'] == 3
|
767
|
771
|
|
768
|
772
|
def test_api__get_workspace_content__ok_200__get_all_root_content(self):
|
|
@@ -799,7 +803,7 @@ class TestWorkspaceContents(FunctionalTest):
|
799
|
803
|
assert content['show_in_ui'] is True
|
800
|
804
|
assert content['slug'] == 'new-fruit-salad'
|
801
|
805
|
assert content['status'] == 'open'
|
802
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
806
|
+ assert set(content['sub_content_types']) == {'comment'}
|
803
|
807
|
assert content['workspace_id'] == 3
|
804
|
808
|
|
805
|
809
|
content = res[2]
|
|
@@ -812,7 +816,7 @@ class TestWorkspaceContents(FunctionalTest):
|
812
|
816
|
assert content['show_in_ui'] is True
|
813
|
817
|
assert content['slug'].startswith('fruit-salad')
|
814
|
818
|
assert content['status'] == 'open'
|
815
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
819
|
+ assert set(content['sub_content_types']) == {'comment'}
|
816
|
820
|
assert content['workspace_id'] == 3
|
817
|
821
|
|
818
|
822
|
content = res[3]
|
|
@@ -825,7 +829,7 @@ class TestWorkspaceContents(FunctionalTest):
|
825
|
829
|
assert content['show_in_ui'] is True
|
826
|
830
|
assert content['slug'].startswith('bad-fruit-salad')
|
827
|
831
|
assert content['status'] == 'open'
|
828
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
832
|
+ assert set(content['sub_content_types']) == {'comment'}
|
829
|
833
|
assert content['workspace_id'] == 3
|
830
|
834
|
|
831
|
835
|
def test_api__get_workspace_content__ok_200__get_only_active_root_content(self): # nopep8
|
|
@@ -862,7 +866,7 @@ class TestWorkspaceContents(FunctionalTest):
|
862
|
866
|
assert content['show_in_ui'] is True
|
863
|
867
|
assert content['slug'] == 'new-fruit-salad'
|
864
|
868
|
assert content['status'] == 'open'
|
865
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
869
|
+ assert set(content['sub_content_types']) == {'comment'}
|
866
|
870
|
assert content['workspace_id'] == 3
|
867
|
871
|
|
868
|
872
|
def test_api__get_workspace_content__ok_200__get_only_archived_root_content(self): # nopep8
|
|
@@ -898,7 +902,7 @@ class TestWorkspaceContents(FunctionalTest):
|
898
|
902
|
assert content['show_in_ui'] is True
|
899
|
903
|
assert content['slug'].startswith('fruit-salad')
|
900
|
904
|
assert content['status'] == 'open'
|
901
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
905
|
+ assert set(content['sub_content_types']) == {'comment'}
|
902
|
906
|
assert content['workspace_id'] == 3
|
903
|
907
|
|
904
|
908
|
def test_api__get_workspace_content__ok_200__get_only_deleted_root_content(self): # nopep8
|
|
@@ -936,7 +940,7 @@ class TestWorkspaceContents(FunctionalTest):
|
936
|
940
|
assert content['show_in_ui'] is True
|
937
|
941
|
assert content['slug'].startswith('bad-fruit-salad')
|
938
|
942
|
assert content['status'] == 'open'
|
939
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
943
|
+ assert set(content['sub_content_types']) == {'comment'}
|
940
|
944
|
assert content['workspace_id'] == 3
|
941
|
945
|
|
942
|
946
|
def test_api__get_workspace_content__ok_200__get_nothing_root_content(self):
|
|
@@ -1058,7 +1062,7 @@ class TestWorkspaceContents(FunctionalTest):
|
1058
|
1062
|
assert content['show_in_ui'] is True
|
1059
|
1063
|
assert content['slug'] == 'test-thread'
|
1060
|
1064
|
assert content['status'] == 'open'
|
1061
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
1065
|
+ assert set(content['sub_content_types']) == {'comment'}
|
1062
|
1066
|
assert content['workspace_id'] == 1
|
1063
|
1067
|
|
1064
|
1068
|
def test_api__get_workspace_content__ok_200__get_all_filter_content_html_and_legacy_page(self): # nopep8
|
|
@@ -1155,7 +1159,7 @@ class TestWorkspaceContents(FunctionalTest):
|
1155
|
1159
|
assert content['show_in_ui'] is True
|
1156
|
1160
|
assert content['slug'] == 'test-page'
|
1157
|
1161
|
assert content['status'] == 'open'
|
1158
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
1162
|
+ assert set(content['sub_content_types']) == {'comment'} # nopep8
|
1159
|
1163
|
assert content['workspace_id'] == 1
|
1160
|
1164
|
content = res[1]
|
1161
|
1165
|
assert content['content_type'] == 'html-document'
|
|
@@ -1167,7 +1171,7 @@ class TestWorkspaceContents(FunctionalTest):
|
1167
|
1171
|
assert content['show_in_ui'] is True
|
1168
|
1172
|
assert content['slug'] == 'test-html-page'
|
1169
|
1173
|
assert content['status'] == 'open'
|
1170
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
1174
|
+ assert set(content['sub_content_types']) == {'comment'} # nopep8
|
1171
|
1175
|
assert content['workspace_id'] == 1
|
1172
|
1176
|
assert res[0]['content_id'] != res[1]['content_id']
|
1173
|
1177
|
|
|
@@ -1205,7 +1209,7 @@ class TestWorkspaceContents(FunctionalTest):
|
1205
|
1209
|
assert content['show_in_ui'] is True
|
1206
|
1210
|
assert content['slug'] == 'new-fruit-salad'
|
1207
|
1211
|
assert content['status'] == 'open'
|
1208
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
1212
|
+ assert set(content['sub_content_types']) == {'comment'} # nopep8
|
1209
|
1213
|
assert content['workspace_id'] == 2
|
1210
|
1214
|
|
1211
|
1215
|
content = res[1]
|
|
@@ -1218,7 +1222,7 @@ class TestWorkspaceContents(FunctionalTest):
|
1218
|
1222
|
assert content['show_in_ui'] is True
|
1219
|
1223
|
assert content['slug'].startswith('fruit-salad')
|
1220
|
1224
|
assert content['status'] == 'open'
|
1221
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
1225
|
+ assert set(content['sub_content_types']) == {'comment'} # nopep8
|
1222
|
1226
|
assert content['workspace_id'] == 2
|
1223
|
1227
|
|
1224
|
1228
|
content = res[2]
|
|
@@ -1231,7 +1235,7 @@ class TestWorkspaceContents(FunctionalTest):
|
1231
|
1235
|
assert content['show_in_ui'] is True
|
1232
|
1236
|
assert content['slug'].startswith('bad-fruit-salad')
|
1233
|
1237
|
assert content['status'] == 'open'
|
1234
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
1238
|
+ assert set(content['sub_content_types']) == {'comment'} # nopep8
|
1235
|
1239
|
assert content['workspace_id'] == 2
|
1236
|
1240
|
|
1237
|
1241
|
def test_api__get_workspace_content__ok_200__get_only_active_folder_content(self): # nopep8
|
|
@@ -1267,7 +1271,7 @@ class TestWorkspaceContents(FunctionalTest):
|
1267
|
1271
|
assert content['show_in_ui'] is True
|
1268
|
1272
|
assert content['slug'] == 'new-fruit-salad'
|
1269
|
1273
|
assert content['status'] == 'open'
|
1270
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
1274
|
+ assert set(content['sub_content_types']) == {'comment'} # nopep8
|
1271
|
1275
|
assert content['workspace_id'] == 2
|
1272
|
1276
|
|
1273
|
1277
|
def test_api__get_workspace_content__ok_200__get_only_archived_folder_content(self): # nopep8
|
|
@@ -1303,7 +1307,7 @@ class TestWorkspaceContents(FunctionalTest):
|
1303
|
1307
|
assert content['show_in_ui'] is True
|
1304
|
1308
|
assert content['slug'].startswith('fruit-salad')
|
1305
|
1309
|
assert content['status'] == 'open'
|
1306
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
1310
|
+ assert set(content['sub_content_types']) == {'comment'} # nopep8
|
1307
|
1311
|
assert content['workspace_id'] == 2
|
1308
|
1312
|
|
1309
|
1313
|
def test_api__get_workspace_content__ok_200__get_only_deleted_folder_content(self): # nopep8
|
|
@@ -1340,7 +1344,7 @@ class TestWorkspaceContents(FunctionalTest):
|
1340
|
1344
|
assert content['show_in_ui'] is True
|
1341
|
1345
|
assert content['slug'].startswith('bad-fruit-salad')
|
1342
|
1346
|
assert content['status'] == 'open'
|
1343
|
|
- assert set(content['sub_content_types']) == {'thread', 'html-document', 'folder', 'file'} # nopep8
|
|
1347
|
+ assert set(content['sub_content_types']) == {'comment'} # nopep8
|
1344
|
1348
|
assert content['workspace_id'] == 2
|
1345
|
1349
|
|
1346
|
1350
|
def test_api__get_workspace_content__ok_200__get_nothing_folder_content(self): # nopep8
|