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:
liu an 2025-04-09 20:29:29 +08:00 committed by GitHub
parent a008b38cf5
commit 22758a2763
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 7 deletions

View File

@ -81,7 +81,6 @@ class TestChatAssistantsDelete:
assert res["message"] == "You don't own the chat invalid_id"
res = list_chat_assistants(get_http_api_auth)
print(res)
assert len(res["data"]) == 0
def test_repeated_deletion(self, get_http_api_auth, add_chat_assistants_func):
@ -93,17 +92,15 @@ class TestChatAssistantsDelete:
assert res["code"] == 102
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):
_, _, chat_assistant_ids = add_chat_assistants_func
res = delete_chat_assistants(get_http_api_auth, {"ids": chat_assistant_ids + chat_assistant_ids})
print(res)
assert res["code"] == 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)
assert len(res["data"]) == 0
res = list_chat_assistants(get_http_api_auth)
assert res["code"] == 0
@pytest.mark.slow
def test_concurrent_deletion(self, get_http_api_auth):

View File

@ -109,6 +109,5 @@ class TestSessionWithChatAssistantCreate:
res = delete_chat_assistants(get_http_api_auth, {"ids": [chat_assistant_ids[0]]})
assert res["code"] == 0
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["message"] == "You do not own the assistant."