feat: simplify SOP to immediate-effect configuration
This commit is contained in:
13
internal/knowledge/graph_test.go
Normal file
13
internal/knowledge/graph_test.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package knowledge
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestNormalizeGraphInputSupportsMultipleDiseases(t *testing.T) {
|
||||
items, relations, err := normalizeGraphInput(GraphInput{Symptoms: []SymptomInput{{Key: "poor_appetite", Name: "食欲下降", Diseases: []GraphItemInput{{Key: "gi", Name: "肠胃不适"}, {Key: "dental", Name: "口腔问题"}}}}})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(items) != 3 || len(relations) != 2 {
|
||||
t.Fatalf("items=%d relations=%d", len(items), len(relations))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user