Test: Added test cases for Stop Parse Documents HTTP API (#6285)

### What problem does this PR solve?

cover [stop parse
documents](https://ragflow.io/docs/dev/http_api_reference#stop-parsing-documents)
endpoints

### Type of change

- [x] Add test cases
This commit is contained in:
liu an
2025-03-20 09:42:50 +08:00
committed by GitHub
parent 1d6760dd84
commit dbf2ee56c6
3 changed files with 236 additions and 1 deletions

View File

@ -163,3 +163,9 @@ def parse_documnet(auth, dataset_id, payload=None):
url = f"{HOST_ADDRESS}{FILE_CHUNK_API_URL}".format(dataset_id=dataset_id)
res = requests.post(url=url, headers=HEADERS, auth=auth, json=payload)
return res.json()
def stop_parse_documnet(auth, dataset_id, payload=None):
url = f"{HOST_ADDRESS}{FILE_CHUNK_API_URL}".format(dataset_id=dataset_id)
res = requests.delete(url=url, headers=HEADERS, auth=auth, json=payload)
return res.json()