1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-04-28 03:20:10 +00:00
seafile-server/tests/utils.py
Shuai Lin b2d058badc
Add functional tests (#120)
* functional tests setup

* add a test case
2018-01-16 17:10:26 +08:00

16 lines
328 B
Python

import os
import random
import string
from seaserv import ccnet_api, seafile_api
def create_and_get_repo(*a, **kw):
repo_id = seafile_api.create_repo(*a, **kw)
repo = seafile_api.get_repo(repo_id)
return repo
def randstring(length=12):
return ''.join(random.choice(string.lowercase) for i in range(length))