1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 23:48:47 +00:00

update test

This commit is contained in:
lian
2019-06-10 15:24:56 +08:00
parent c06dc0f0a4
commit 4a4d5142c2

View File

@@ -615,6 +615,9 @@ class ReposAsyncBatchCopyItemView(BaseTestCase):
def test_copy_with_invalid_src_folder_permission(self):
if not LOCAL_PRO_DEV_ENV:
return
self.login_as(self.user)
# share admin's tmp repo to user with 'cloud-edit' permission
@@ -664,9 +667,11 @@ class ReposAsyncBatchCopyItemView(BaseTestCase):
}
resp = self.client.post(self.url, json.dumps(data), 'application/json')
self.assertEqual(403, resp.status_code)
self.remove_repo(admin_repo_id)
if not LOCAL_PRO_DEV_ENV:
return
# share admin's tmp repo to user with 'cloud-edit' permission
admin_repo_id = self.create_new_repo(self.admin_name)
seafile_api.share_repo(admin_repo_id, self.admin_name,
@@ -907,6 +912,9 @@ class ReposAsyncBatchMoveItemView(BaseTestCase):
self.assertEqual(403, resp.status_code)
self.remove_repo(admin_repo_id)
if not LOCAL_PRO_DEV_ENV:
return
# share admin's tmp repo to user with 'cloud-edit' permission
admin_repo_id = self.create_new_repo(self.admin_name)
seafile_api.share_repo(admin_repo_id, self.admin_name,
@@ -955,6 +963,9 @@ class ReposAsyncBatchMoveItemView(BaseTestCase):
resp = self.client.post(self.url, json.dumps(data), 'application/json')
self.assertEqual(403, resp.status_code)
if not LOCAL_PRO_DEV_ENV:
return
# share admin's tmp repo to user with 'cloud-edit' permission
admin_repo_id = self.create_new_repo(self.admin_name)
seafile_api.share_repo(admin_repo_id, self.admin_name,