mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-09-01 19:41:57 +00:00
28 lines
697 B
Go
28 lines
697 B
Go
package constant
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestNormalizeTaskAction(t *testing.T) {
|
|
tests := map[string]string{
|
|
"generate": TaskActionImageToVideo,
|
|
"textGenerate": TaskActionTextToVideo,
|
|
"firstTailGenerate": TaskActionFirstTailToVideo,
|
|
"referenceGenerate": TaskActionReferenceToVideo,
|
|
"remixGenerate": TaskActionRemix,
|
|
TaskActionTextToVideo: TaskActionTextToVideo,
|
|
"MUSIC": "MUSIC",
|
|
"custom_action": "custom_action",
|
|
"": "",
|
|
}
|
|
|
|
for input, expected := range tests {
|
|
t.Run(input, func(t *testing.T) {
|
|
assert.Equal(t, expected, NormalizeTaskAction(input))
|
|
})
|
|
}
|
|
}
|