From a4efe57c4930be1f41a659c198b541f18e69c9e6 Mon Sep 17 00:00:00 2001 From: sniper-py <38058090+sniper-py@users.noreply.github.com> Date: Thu, 27 Jun 2019 13:22:33 +0800 Subject: [PATCH] department clear trash test fix (#3742) --- tests/api/endpoints/test_repo_trash.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/api/endpoints/test_repo_trash.py b/tests/api/endpoints/test_repo_trash.py index b172a5a070..ed525e879e 100644 --- a/tests/api/endpoints/test_repo_trash.py +++ b/tests/api/endpoints/test_repo_trash.py @@ -9,6 +9,12 @@ from seahub.test_utils import BaseTestCase from seahub.group.utils import is_group_admin from tests.common.utils import randstring +try: + from seahub.settings import LOCAL_PRO_DEV_ENV +except ImportError: + LOCAL_PRO_DEV_ENV = False + + class RepoTrashTest(BaseTestCase): def setUp(self): @@ -89,6 +95,9 @@ class RepoTrashTest(BaseTestCase): assert len(json_resp['data']) == 0 def test_can_clean_department_repo_trash(self): + if not LOCAL_PRO_DEV_ENV: + return + # create a department group_id = ccnet_api.create_group('department_test', 'system admin', parent_group_id=-1) seafile_api.set_group_quota(group_id, -2)