mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-07-10 00:14:38 +00:00
Lighten AI intelligence handler test setup
This commit is contained in:
parent
7297aae4af
commit
79a501e092
1 changed files with 5 additions and 5 deletions
|
|
@ -8,17 +8,17 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/rcourtman/pulse-go-rewrite/internal/config"
|
||||
"github.com/rcourtman/pulse-go-rewrite/internal/ai"
|
||||
"github.com/rcourtman/pulse-go-rewrite/internal/unifiedresources"
|
||||
)
|
||||
|
||||
// createTestAIHandler creates a test AI handler with minimal setup
|
||||
func createTestAIHandler(t *testing.T) *AISettingsHandler {
|
||||
t.Helper()
|
||||
tmp := t.TempDir()
|
||||
cfg := &config.Config{DataPath: tmp}
|
||||
persistence := config.NewConfigPersistence(tmp)
|
||||
return newTestAISettingsHandler(cfg, persistence, nil)
|
||||
return &AISettingsHandler{
|
||||
defaultAIService: ai.NewService(nil, nil),
|
||||
aiServices: make(map[string]*ai.Service),
|
||||
}
|
||||
}
|
||||
|
||||
// TestHandleGetPatterns tests the patterns endpoint
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue