1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 16:10:26 +00:00

fix upload_file_test (#4343)

* fix upload_file_test

* seahub/views/ajax.py

* seahub/api2/views.py

* seahub/api2/endpoints/admin/system_library.py

* seahub/api2/endpoints/admin/upload_links.py

* seahub/api2/endpoints/upload_links.py

* seahub/api2/endpoints/via_repo_token.py

* seahub/api2/views.py

* tests/seahub/views/ajax/test_get_file_upload_url_u
This commit is contained in:
sniper-py
2019-12-10 14:07:55 +08:00
committed by Daniel Pan
parent c21c5d2ac6
commit bc8c91b549
10 changed files with 38 additions and 19 deletions

View File

@@ -21,11 +21,11 @@ def urljoin(base, *args):
def apiurl(*parts):
return urljoin(BASE_URL, *parts)
def upload_file_test(upload_link):
def upload_file_test(upload_link, parent_dir='/'):
file_name = randstring(6)
files = {
'file': (file_name, 'Some lines in this file'),
'parent_dir': '/',
'parent_dir': parent_dir,
}
resp = requests.post(upload_link, files=files)