refactor: incr feed/live count for video crawler

This commit is contained in:
lilong.129
2023-08-22 11:44:50 +08:00
parent 31e31159a7
commit 75158b4e58
2 changed files with 30 additions and 153 deletions
-19
View File
@@ -4,8 +4,6 @@ package uixt
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestVideoCrawler(t *testing.T) {
@@ -33,20 +31,3 @@ func TestVideoCrawler(t *testing.T) {
err := driverExt.VideoCrawler(configs)
checkErr(t, err)
}
func TestRemoveNonAlphanumeric(t *testing.T) {
testData := []struct {
input string
expect string
}{
{"@Hello 你好123#@", "Hello你好123"},
{"@夏夏在发呆。", "夏夏在发呆"},
{"@·霖霖", "霖霖"},
{"@我❤️小云朵", "我小云朵"},
}
for _, data := range testData {
out := removeNonAlphanumeric(data.input)
assert.Equal(t, data.expect, out)
}
}