mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-13 21:25:53 +08:00
Test: Update test cases for PR 6888 ISSUE 6876 (#6907)
### What problem does this PR solve? PR #6888 ISSUE #6876 ### Type of change - [x] Update test case
This commit is contained in:
parent
a008b38cf5
commit
22758a2763
@ -81,7 +81,6 @@ class TestChatAssistantsDelete:
|
|||||||
assert res["message"] == "You don't own the chat invalid_id"
|
assert res["message"] == "You don't own the chat invalid_id"
|
||||||
|
|
||||||
res = list_chat_assistants(get_http_api_auth)
|
res = list_chat_assistants(get_http_api_auth)
|
||||||
print(res)
|
|
||||||
assert len(res["data"]) == 0
|
assert len(res["data"]) == 0
|
||||||
|
|
||||||
def test_repeated_deletion(self, get_http_api_auth, add_chat_assistants_func):
|
def test_repeated_deletion(self, get_http_api_auth, add_chat_assistants_func):
|
||||||
@ -93,17 +92,15 @@ class TestChatAssistantsDelete:
|
|||||||
assert res["code"] == 102
|
assert res["code"] == 102
|
||||||
assert "You don't own the chat" in res["message"]
|
assert "You don't own the chat" in res["message"]
|
||||||
|
|
||||||
@pytest.mark.skip(reason="issues/6876")
|
|
||||||
def test_duplicate_deletion(self, get_http_api_auth, add_chat_assistants_func):
|
def test_duplicate_deletion(self, get_http_api_auth, add_chat_assistants_func):
|
||||||
_, _, chat_assistant_ids = add_chat_assistants_func
|
_, _, chat_assistant_ids = add_chat_assistants_func
|
||||||
res = delete_chat_assistants(get_http_api_auth, {"ids": chat_assistant_ids + chat_assistant_ids})
|
res = delete_chat_assistants(get_http_api_auth, {"ids": chat_assistant_ids + chat_assistant_ids})
|
||||||
print(res)
|
|
||||||
assert res["code"] == 0
|
assert res["code"] == 0
|
||||||
assert "Duplicate chat ids" in res["data"]["errors"][0]
|
assert "Duplicate chat ids" in res["data"]["errors"][0]
|
||||||
assert res["data"]["success_count"] == 3
|
assert res["data"]["success_count"] == 5
|
||||||
|
|
||||||
res = delete_chat_assistants(get_http_api_auth)
|
res = list_chat_assistants(get_http_api_auth)
|
||||||
assert len(res["data"]) == 0
|
assert res["code"] == 0
|
||||||
|
|
||||||
@pytest.mark.slow
|
@pytest.mark.slow
|
||||||
def test_concurrent_deletion(self, get_http_api_auth):
|
def test_concurrent_deletion(self, get_http_api_auth):
|
||||||
|
@ -109,6 +109,5 @@ class TestSessionWithChatAssistantCreate:
|
|||||||
res = delete_chat_assistants(get_http_api_auth, {"ids": [chat_assistant_ids[0]]})
|
res = delete_chat_assistants(get_http_api_auth, {"ids": [chat_assistant_ids[0]]})
|
||||||
assert res["code"] == 0
|
assert res["code"] == 0
|
||||||
res = create_session_with_chat_assistant(get_http_api_auth, chat_assistant_ids[0], {"name": "valid_name"})
|
res = create_session_with_chat_assistant(get_http_api_auth, chat_assistant_ids[0], {"name": "valid_name"})
|
||||||
print(res)
|
|
||||||
assert res["code"] == 102
|
assert res["code"] == 102
|
||||||
assert res["message"] == "You do not own the assistant."
|
assert res["message"] == "You do not own the assistant."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user