|
@@ -807,12 +807,16 @@ class TestWorkspaceContents(FunctionalTest):
|
807
|
807
|
res = self.testapp.put_json(
|
808
|
808
|
'/api/v2/workspaces/2/contents/8/move',
|
809
|
809
|
params=params,
|
810
|
|
- status=204
|
|
810
|
+ status=200
|
811
|
811
|
)
|
812
|
812
|
new_folder1_contents = self.testapp.get('/api/v2/workspaces/2/contents', params=params_folder1, status=200).json_body # nopep8
|
813
|
813
|
new_folder2_contents = self.testapp.get('/api/v2/workspaces/2/contents', params=params_folder2, status=200).json_body # nopep8
|
814
|
814
|
assert not [content for content in new_folder1_contents if content['content_id'] == 8] # nopep8
|
815
|
815
|
assert [content for content in new_folder2_contents if content['content_id'] == 8] # nopep8
|
|
816
|
+ assert res.json_body
|
|
817
|
+ assert res.json_body['parent_id'] == 4
|
|
818
|
+ assert res.json_body['content_id'] == 8
|
|
819
|
+ assert res.json_body['workspace_id'] == 2
|
816
|
820
|
|
817
|
821
|
def test_api_put_move_content__ok_200__to_root(self):
|
818
|
822
|
"""
|
|
@@ -857,6 +861,10 @@ class TestWorkspaceContents(FunctionalTest):
|
857
|
861
|
new_folder2_contents = self.testapp.get('/api/v2/workspaces/2/contents', params=params_folder2, status=200).json_body # nopep8
|
858
|
862
|
assert not [content for content in new_folder1_contents if content['content_id'] == 8] # nopep8
|
859
|
863
|
assert [content for content in new_folder2_contents if content['content_id'] == 8] # nopep8
|
|
864
|
+ assert res.json_body
|
|
865
|
+ assert res.json_body['parent_id'] == 0
|
|
866
|
+ assert res.json_body['content_id'] == 8
|
|
867
|
+ assert res.json_body['workspace_id'] == 2
|
860
|
868
|
|
861
|
869
|
def test_api_put_move_content__ok_200__with_workspace_id(self):
|
862
|
870
|
"""
|
|
@@ -902,6 +910,10 @@ class TestWorkspaceContents(FunctionalTest):
|
902
|
910
|
new_folder2_contents = self.testapp.get('/api/v2/workspaces/2/contents', params=params_folder2, status=200).json_body # nopep8
|
903
|
911
|
assert not [content for content in new_folder1_contents if content['content_id'] == 8] # nopep8
|
904
|
912
|
assert [content for content in new_folder2_contents if content['content_id'] == 8] # nopep8
|
|
913
|
+ assert res.json_body
|
|
914
|
+ assert res.json_body['parent_id'] == 4
|
|
915
|
+ assert res.json_body['content_id'] == 8
|
|
916
|
+ assert res.json_body['workspace_id'] == 2
|
905
|
917
|
|
906
|
918
|
def test_api_put_move_content__ok_200__to_another_workspace(self):
|
907
|
919
|
"""
|
|
@@ -946,6 +958,10 @@ class TestWorkspaceContents(FunctionalTest):
|
946
|
958
|
new_folder2_contents = self.testapp.get('/api/v2/workspaces/1/contents', params=params_folder2, status=200).json_body # nopep8
|
947
|
959
|
assert not [content for content in new_folder1_contents if content['content_id'] == 8] # nopep8
|
948
|
960
|
assert [content for content in new_folder2_contents if content['content_id'] == 8] # nopep8
|
|
961
|
+ assert res.json_body
|
|
962
|
+ assert res.json_body['parent_id'] == 2
|
|
963
|
+ assert res.json_body['content_id'] == 8
|
|
964
|
+ assert res.json_body['workspace_id'] == 1
|
949
|
965
|
|
950
|
966
|
def test_api_put_move_content__ok_200__to_another_workspace_root(self):
|
951
|
967
|
"""
|
|
@@ -991,6 +1007,10 @@ class TestWorkspaceContents(FunctionalTest):
|
991
|
1007
|
new_folder2_contents = self.testapp.get('/api/v2/workspaces/1/contents', params=params_folder2, status=200).json_body # nopep8
|
992
|
1008
|
assert not [content for content in new_folder1_contents if content['content_id'] == 8] # nopep8
|
993
|
1009
|
assert [content for content in new_folder2_contents if content['content_id'] == 8] # nopep8
|
|
1010
|
+ assert res.json_body
|
|
1011
|
+ assert res.json_body['parent_id'] == 0
|
|
1012
|
+ assert res.json_body['content_id'] == 8
|
|
1013
|
+ assert res.json_body['workspace_id'] == 1
|
994
|
1014
|
|
995
|
1015
|
def test_api_put_move_content__err_400__wrong_workspace_id(self):
|
996
|
1016
|
"""
|