1
0
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:
lian
2018-04-27 14:33:08 +08:00
committed by ilearnit
parent 0a1f929086
commit 55014a2527
4 changed files with 49 additions and 1 deletions

View File

@@ -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)