mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-14 08:58:27 +08:00
feat(go-agent): Ported retrieval node, added Keenable web search tool (#16396)
Ported retrieval node, added Keenable web search tool - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@@ -142,7 +142,7 @@ class TestDatasetsDelete:
|
||||
payload = {"ids": ["not_uuid"]}
|
||||
res = delete_datasets(HttpApiAuth, payload)
|
||||
assert res["code"] == 101, res
|
||||
assert "Invalid UUID1 format" in res["message"], res
|
||||
assert "Invalid UUID format" in res["message"], res
|
||||
|
||||
res = list_datasets(HttpApiAuth)
|
||||
assert len(res["data"]) == 1, res
|
||||
@@ -152,8 +152,8 @@ class TestDatasetsDelete:
|
||||
def test_id_not_uuid1(self, HttpApiAuth):
|
||||
payload = {"ids": [uuid.uuid4().hex]}
|
||||
res = delete_datasets(HttpApiAuth, payload)
|
||||
assert res["code"] == 101, res
|
||||
assert "Invalid UUID1 format" in res["message"], res
|
||||
assert res["code"] == 102, res
|
||||
assert "lacks permission for dataset" in res["message"], res
|
||||
|
||||
@pytest.mark.p2
|
||||
@pytest.mark.usefixtures("add_dataset_func")
|
||||
|
||||
@@ -268,14 +268,14 @@ class TestDatasetsList:
|
||||
params = {"id": "not_uuid"}
|
||||
res = list_datasets(HttpApiAuth, params)
|
||||
assert res["code"] == 101, res
|
||||
assert "Invalid UUID1 format" in res["message"], res
|
||||
assert "Invalid UUID format" in res["message"], res
|
||||
|
||||
@pytest.mark.p2
|
||||
def test_id_not_uuid1(self, HttpApiAuth):
|
||||
params = {"id": uuid.uuid4().hex}
|
||||
res = list_datasets(HttpApiAuth, params)
|
||||
assert res["code"] == 101, res
|
||||
assert "Invalid UUID1 format" in res["message"], res
|
||||
assert res["code"] == 102, res
|
||||
assert "lacks permission for dataset" in res["message"], res
|
||||
|
||||
@pytest.mark.p2
|
||||
def test_id_wrong_uuid(self, HttpApiAuth):
|
||||
@@ -289,7 +289,7 @@ class TestDatasetsList:
|
||||
params = {"id": ""}
|
||||
res = list_datasets(HttpApiAuth, params)
|
||||
assert res["code"] == 101, res
|
||||
assert "Invalid UUID1 format" in res["message"], res
|
||||
assert "Invalid UUID format" in res["message"], res
|
||||
|
||||
@pytest.mark.p2
|
||||
def test_id_none(self, HttpApiAuth):
|
||||
|
||||
@@ -105,14 +105,14 @@ class TestDatasetUpdate:
|
||||
payload = {"name": "not uuid"}
|
||||
res = update_dataset(HttpApiAuth, "not_uuid", payload)
|
||||
assert res["code"] == 101, res
|
||||
assert "Invalid UUID1 format" in res["message"], res
|
||||
assert "Invalid UUID format" in res["message"], res
|
||||
|
||||
@pytest.mark.p3
|
||||
def test_dataset_id_not_uuid1(self, HttpApiAuth):
|
||||
payload = {"name": "not uuid1"}
|
||||
res = update_dataset(HttpApiAuth, uuid.uuid4().hex, payload)
|
||||
assert res["code"] == 101, res
|
||||
assert "Invalid UUID1 format" in res["message"], res
|
||||
assert res["code"] == 102, res
|
||||
assert "lacks permission for dataset" in res["message"], res
|
||||
|
||||
@pytest.mark.p3
|
||||
def test_dataset_id_wrong_uuid(self, HttpApiAuth):
|
||||
|
||||
Reference in New Issue
Block a user