This commit is contained in:
richboo111
2023-08-30 15:06:54 +08:00
parent 29523503d8
commit 67fb302b10
5 changed files with 83 additions and 21 deletions

View File

@@ -376,7 +376,8 @@ func TestRetailSellStatus2(t *testing.T) {
}
func TestCategoryAttrList(t *testing.T) {
result, err := api.CategoryAttrList(200002680)
//result, err := api.CategoryAttrList(200002680)
result, err := api.CategoryAttrList(200005621)
if err != nil {
t.Fatal(err)
}
@@ -384,13 +385,24 @@ func TestCategoryAttrList(t *testing.T) {
}
func TestCategoryAttrValueList(t *testing.T) {
result, err := api.CategoryAttrValueList(100002442, "", 1, 5)
result, err := api.CategoryAttrValueList(1200000088, "苹果", 1, 5)
if err != nil {
t.Fatal(err)
}
t.Log(utils.Format4Output(result, false))
}
func TestRetailRecommendTag(t *testing.T) {
result, err := api.RetailRecommendTag("飞利浦电吹风", "", 0, 1)
if err != nil {
t.Fatal(err)
}
if result == nil {
t.Fatal("should have items")
}
t.Log(utils.Format4Output(result, false))
}
func TestSplit(t *testing.T) {
param := "门店内存在重复的分类:【柑桔柚类】 【底料】 【火锅】,请先删除重复分类后再操作。"
firstIndex := strings.Index(param, "【")