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

update tests of shared repos

This commit is contained in:
lian
2017-11-14 16:01:31 +08:00
parent e6eaa07871
commit 2a680b83c6
2 changed files with 26 additions and 0 deletions

View File

@@ -101,6 +101,20 @@ class SharedReposTest(BaseTestCase):
assert json_resp[0]['share_type'] == 'public'
def test_get_with_invalid_repo_permission(self):
user_shared_repos = \
seafile_api.get_share_out_repo_list(self.admin_name, -1, -1)
for repo in user_shared_repos:
seafile_api.remove_share(repo.repo_id, self.admin_name, repo.user)
group_shared_repos = seafile_api.get_group_repos_by_owner(self.admin_name)
for repo in group_shared_repos:
seafile_api.unset_group_repo(repo.repo_id, repo.group_id, self.admin_name)
public_shared_repos = seafile_api.list_inner_pub_repos_by_owner(self.admin_name)
for repo in public_shared_repos:
seafile_api.remove_inner_pub_repo(repo.repo_id)
self.share_repo_to_user()
self.share_repo_to_group()
self.share_repo_to_public()