MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / TestHomeModelsErrorMessage

Function TestHomeModelsErrorMessage

internal/api/server_test.go:841–848  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

839}
840
841func TestHomeModelsErrorMessage(t *testing.T) {
842 if msg := homeModelsErrorMessage([]byte(`{"error":{"type":"invalid_credential","message":"Invalid API key"}}`)); msg != "Invalid API key" {
843 t.Fatalf("message = %q, want %q", msg, "Invalid API key")
844 }
845 if msg := homeModelsErrorMessage([]byte(`{"openai":[]}`)); msg != "home models request failed" {
846 t.Fatalf("default message = %q, want fallback", msg)
847 }
848}

Callers

nothing calls this directly

Calls 1

homeModelsErrorMessageFunction · 0.85

Tested by

no test coverage detected