Refactor test cases for assistant updates to improve consistency

- Standardized formatting in TestUpdateAssistant and assistant_update_test.go to enhance readability.
- Ensured comments clearly indicate which fields are ignored during updates, maintaining clarity in test intentions.
This commit is contained in:
Max 2025-11-08 16:22:29 +08:00
parent fa5b98f5bf
commit 2099921cf4
2 changed files with 4 additions and 5 deletions

View file

@ -2173,7 +2173,7 @@ func TestUpdateAssistant(t *testing.T) {
// Try to update system fields (should be ignored)
updates := map[string]interface{}{
"assistant_id": "new-id-123", // Should be ignored
"assistant_id": "new-id-123", // Should be ignored
"created_at": int64(123456789), // Should be ignored
"name": "Valid Update", // Should be applied
}

View file

@ -763,9 +763,9 @@ func TestUpdateAssistant(t *testing.T) {
},
},
"options": map[string]interface{}{
"temperature": 0.9,
"max_tokens": 4000,
"top_p": 0.95,
"temperature": 0.9,
"max_tokens": 4000,
"top_p": 0.95,
"frequency_penalty": 0.5,
},
"workflow": map[string]interface{}{
@ -1043,4 +1043,3 @@ func BenchmarkUpdateAssistant(b *testing.B) {
resp.Body.Close()
}
}