Feat: add new tests and tescases for restful api suite (#15347)

### What problem does this PR solve?

extend restful api suite

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
- [x] Other (please describe): test
This commit is contained in:
Idriss Sbaaoui
2026-06-01 11:02:40 +08:00
committed by GitHub
parent 4972af4367
commit da1ed6f0e7
5 changed files with 1692 additions and 11 deletions
+3 -8
View File
@@ -16,8 +16,7 @@
from concurrent.futures import ThreadPoolExecutor
import pytest
import requests
from test.testcases.configs import HOST_ADDRESS, INVALID_API_TOKEN, VERSION
from test.testcases.configs import INVALID_API_TOKEN
from test.testcases.restful_api.helpers.client import RestClient
from test.testcases.utils import wait_for
@@ -378,12 +377,8 @@ def test_deleted_chunks_batch_not_in_retrieval_contract(rest_client, create_docu
@pytest.mark.p2
def test_related_questions_contract(auth, rest_client, rest_client_noauth):
tokens_res = requests.get(
f"{HOST_ADDRESS}/api/{VERSION}/system/tokens",
headers={"Authorization": auth},
timeout=30,
)
def test_related_questions_contract(rest_client, rest_client_noauth):
tokens_res = rest_client.get("/system/tokens")
assert tokens_res.status_code == 200, tokens_res.text
tokens_payload = tokens_res.json()
assert tokens_payload["code"] == 0, tokens_payload