|
@@ -845,8 +845,8 @@ class TestWorkspaceContents(FunctionalTest):
|
845
|
845
|
}
|
846
|
846
|
folder1_contents = self.testapp.get('/api/v2/workspaces/2/contents', params=params_folder1, status=200).json_body # nopep8
|
847
|
847
|
folder2_contents = self.testapp.get('/api/v2/workspaces/2/contents', params=params_folder2, status=200).json_body # nopep8
|
848
|
|
- assert [content for content in folder1_contents if content['id'] == 8] # nopep8
|
849
|
|
- assert not [content for content in folder2_contents if content['id'] == 8] # nopep8
|
|
848
|
+ assert [content for content in folder1_contents if content['content_id'] == 8] # nopep8
|
|
849
|
+ assert not [content for content in folder2_contents if content['content_id'] == 8] # nopep8
|
850
|
850
|
# TODO - G.M - 2018-06-163 - Check content
|
851
|
851
|
res = self.testapp.put_json(
|
852
|
852
|
'/api/v2/workspaces/2/contents/8/move',
|
|
@@ -855,8 +855,8 @@ class TestWorkspaceContents(FunctionalTest):
|
855
|
855
|
)
|
856
|
856
|
new_folder1_contents = self.testapp.get('/api/v2/workspaces/2/contents', params=params_folder1, status=200).json_body # nopep8
|
857
|
857
|
new_folder2_contents = self.testapp.get('/api/v2/workspaces/2/contents', params=params_folder2, status=200).json_body # nopep8
|
858
|
|
- assert not [content for content in new_folder1_contents if content['id'] == 8] # nopep8
|
859
|
|
- assert [content for content in new_folder2_contents if content['id'] == 8] # nopep8
|
|
858
|
+ assert not [content for content in new_folder1_contents if content['content_id'] == 8] # nopep8
|
|
859
|
+ assert [content for content in new_folder2_contents if content['content_id'] == 8] # nopep8
|
860
|
860
|
|
861
|
861
|
def test_api_put_move_content__ok_200__with_workspace_id(self):
|
862
|
862
|
"""
|
|
@@ -890,8 +890,8 @@ class TestWorkspaceContents(FunctionalTest):
|
890
|
890
|
}
|
891
|
891
|
folder1_contents = self.testapp.get('/api/v2/workspaces/2/contents', params=params_folder1, status=200).json_body # nopep8
|
892
|
892
|
folder2_contents = self.testapp.get('/api/v2/workspaces/2/contents', params=params_folder2, status=200).json_body # nopep8
|
893
|
|
- assert [content for content in folder1_contents if content['id'] == 8] # nopep8
|
894
|
|
- assert not [content for content in folder2_contents if content['id'] == 8] # nopep8
|
|
893
|
+ assert [content for content in folder1_contents if content['content_id'] == 8] # nopep8
|
|
894
|
+ assert not [content for content in folder2_contents if content['content_id'] == 8] # nopep8
|
895
|
895
|
# TODO - G.M - 2018-06-163 - Check content
|
896
|
896
|
res = self.testapp.put_json(
|
897
|
897
|
'/api/v2/workspaces/2/contents/8/move',
|
|
@@ -900,8 +900,8 @@ class TestWorkspaceContents(FunctionalTest):
|
900
|
900
|
)
|
901
|
901
|
new_folder1_contents = self.testapp.get('/api/v2/workspaces/2/contents', params=params_folder1, status=200).json_body # nopep8
|
902
|
902
|
new_folder2_contents = self.testapp.get('/api/v2/workspaces/2/contents', params=params_folder2, status=200).json_body # nopep8
|
903
|
|
- assert not [content for content in new_folder1_contents if content['id'] == 8] # nopep8
|
904
|
|
- assert [content for content in new_folder2_contents if content['id'] == 8] # nopep8
|
|
903
|
+ assert not [content for content in new_folder1_contents if content['content_id'] == 8] # nopep8
|
|
904
|
+ assert [content for content in new_folder2_contents if content['content_id'] == 8] # nopep8
|
905
|
905
|
|
906
|
906
|
def test_api_put_move_content__ok_200__to_another_workspace(self):
|
907
|
907
|
"""
|
|
@@ -934,8 +934,8 @@ class TestWorkspaceContents(FunctionalTest):
|
934
|
934
|
}
|
935
|
935
|
folder1_contents = self.testapp.get('/api/v2/workspaces/2/contents', params=params_folder1, status=200).json_body # nopep8
|
936
|
936
|
folder2_contents = self.testapp.get('/api/v2/workspaces/1/contents', params=params_folder2, status=200).json_body # nopep8
|
937
|
|
- assert [content for content in folder1_contents if content['id'] == 8] # nopep8
|
938
|
|
- assert not [content for content in folder2_contents if content['id'] == 8] # nopep8
|
|
937
|
+ assert [content for content in folder1_contents if content['content_id'] == 8] # nopep8
|
|
938
|
+ assert not [content for content in folder2_contents if content['content_id'] == 8] # nopep8
|
939
|
939
|
# TODO - G.M - 2018-06-163 - Check content
|
940
|
940
|
res = self.testapp.put_json(
|
941
|
941
|
'/api/v2/workspaces/2/contents/8/move',
|
|
@@ -944,8 +944,8 @@ class TestWorkspaceContents(FunctionalTest):
|
944
|
944
|
)
|
945
|
945
|
new_folder1_contents = self.testapp.get('/api/v2/workspaces/2/contents', params=params_folder1, status=200).json_body # nopep8
|
946
|
946
|
new_folder2_contents = self.testapp.get('/api/v2/workspaces/1/contents', params=params_folder2, status=200).json_body # nopep8
|
947
|
|
- assert not [content for content in new_folder1_contents if content['id'] == 8] # nopep8
|
948
|
|
- assert [content for content in new_folder2_contents if content['id'] == 8] # nopep8
|
|
947
|
+ assert not [content for content in new_folder1_contents if content['content_id'] == 8] # nopep8
|
|
948
|
+ assert [content for content in new_folder2_contents if content['content_id'] == 8] # nopep8
|
949
|
949
|
|
950
|
950
|
def test_api_put_move_content__ok_200__to_another_workspace_root(self):
|
951
|
951
|
"""
|
|
@@ -979,8 +979,8 @@ class TestWorkspaceContents(FunctionalTest):
|
979
|
979
|
}
|
980
|
980
|
folder1_contents = self.testapp.get('/api/v2/workspaces/2/contents', params=params_folder1, status=200).json_body # nopep8
|
981
|
981
|
folder2_contents = self.testapp.get('/api/v2/workspaces/1/contents', params=params_folder2, status=200).json_body # nopep8
|
982
|
|
- assert [content for content in folder1_contents if content['id'] == 8] # nopep8
|
983
|
|
- assert not [content for content in folder2_contents if content['id'] == 8] # nopep8
|
|
982
|
+ assert [content for content in folder1_contents if content['content_id'] == 8] # nopep8
|
|
983
|
+ assert not [content for content in folder2_contents if content['content_id'] == 8] # nopep8
|
984
|
984
|
# TODO - G.M - 2018-06-163 - Check content
|
985
|
985
|
res = self.testapp.put_json(
|
986
|
986
|
'/api/v2/workspaces/2/contents/8/move',
|
|
@@ -989,8 +989,8 @@ class TestWorkspaceContents(FunctionalTest):
|
989
|
989
|
)
|
990
|
990
|
new_folder1_contents = self.testapp.get('/api/v2/workspaces/2/contents', params=params_folder1, status=200).json_body # nopep8
|
991
|
991
|
new_folder2_contents = self.testapp.get('/api/v2/workspaces/1/contents', params=params_folder2, status=200).json_body # nopep8
|
992
|
|
- assert not [content for content in new_folder1_contents if content['id'] == 8] # nopep8
|
993
|
|
- assert [content for content in new_folder2_contents if content['id'] == 8] # nopep8
|
|
992
|
+ assert not [content for content in new_folder1_contents if content['content_id'] == 8] # nopep8
|
|
993
|
+ assert [content for content in new_folder2_contents if content['content_id'] == 8] # nopep8
|
994
|
994
|
|
995
|
995
|
def test_api_put_move_content__err_400__wrong_workspace_id(self):
|
996
|
996
|
"""
|