mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-04-22 14:10:01 +08:00

### What problem does this PR solve? Add tests for frontend API ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Co-authored-by: liuhua <10215101452@stu.ecun.edu.cn>
11 lines
355 B
Python
11 lines
355 B
Python
from common import HOST_ADDRESS
|
|
import requests
|
|
def test_create_dataset(get_auth):
|
|
authorization={"Authorization": get_auth}
|
|
url = f"{HOST_ADDRESS}/v1/kb/create"
|
|
json = {"name":"test_create_dataset"}
|
|
res = requests.post(url=url,headers=authorization,json=json)
|
|
res = res.json()
|
|
assert res.get("code") == 0,f"{res.get('message')}"
|
|
|