1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-02 16:04:26 +00:00

Add functional tests (#120)

* functional tests setup

* add a test case
This commit is contained in:
Shuai Lin
2018-01-16 17:10:26 +08:00
committed by GitHub
parent fa1e439633
commit b2d058badc
21 changed files with 542 additions and 689 deletions

15
tests/utils.py Normal file
View File

@@ -0,0 +1,15 @@
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))