mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-08 02:10:24 +00:00
udpate group transfer test
This commit is contained in:
@@ -6,6 +6,11 @@ from seaserv import ccnet_api
|
||||
from seahub.test_utils import BaseTestCase
|
||||
from tests.common.utils import randstring
|
||||
|
||||
try:
|
||||
from seahub.settings import LOCAL_PRO_DEV_ENV
|
||||
except ImportError:
|
||||
LOCAL_PRO_DEV_ENV = False
|
||||
|
||||
|
||||
class GroupsTest(BaseTestCase):
|
||||
|
||||
@@ -17,6 +22,9 @@ class GroupsTest(BaseTestCase):
|
||||
self.url = reverse('api-v2.1-admin-address-book-groups')
|
||||
|
||||
def test_can_list_top_groups(self):
|
||||
if not LOCAL_PRO_DEV_ENV:
|
||||
return
|
||||
|
||||
top_group_id = ccnet_api.create_group('top group xxx', self.user.username,
|
||||
parent_group_id=-1)
|
||||
|
||||
@@ -29,6 +37,9 @@ class GroupsTest(BaseTestCase):
|
||||
self.remove_group(top_group_id)
|
||||
|
||||
def test_can_create_top_group(self):
|
||||
if not LOCAL_PRO_DEV_ENV:
|
||||
return
|
||||
|
||||
resp = self.client.post(self.url, {
|
||||
'group_name': randstring(10),
|
||||
'parent_group': -1,
|
||||
@@ -43,6 +54,9 @@ class GroupsTest(BaseTestCase):
|
||||
self.remove_group(json_resp['id'])
|
||||
|
||||
def test_can_create_child_group(self):
|
||||
if not LOCAL_PRO_DEV_ENV:
|
||||
return
|
||||
|
||||
top_group_id = ccnet_api.create_group('top group xxx', self.user.username,
|
||||
parent_group_id=-1)
|
||||
|
||||
|
Reference in New Issue
Block a user