1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

add amdin system library upload api

This commit is contained in:
lian
2017-07-03 14:42:12 +08:00
parent 101a2015ba
commit 46a5473326
9 changed files with 139 additions and 17 deletions

View File

@@ -1,5 +1,6 @@
import string
import random
import requests
from .common import BASE_URL
@@ -19,3 +20,13 @@ def urljoin(base, *args):
def apiurl(*parts):
return urljoin(BASE_URL, *parts)
def upload_file_test(upload_link):
file_name = randstring(6)
files = {
'file': (file_name, 'Some lines in this file'),
'parent_dir': '/',
}
resp = requests.post(upload_link, files=files)
assert 200 == resp.status_code