停止重复兑换已拥有道具账号
This commit is contained in:
@@ -112,6 +112,15 @@ func TestClassifyRetryStop(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestClassifyXiaodianRetryStopOwnedItem(t *testing.T) {
|
||||
for _, message := range []string{"您已拥有该道具!", "已经拥有该道具", "账号已拥有该商品"} {
|
||||
acc, prod, reason := classifyXiaodianRetryStop(message)
|
||||
if !acc || prod || reason != "账号已拥有该道具" {
|
||||
t.Errorf("classifyXiaodianRetryStop(%q) = (%v,%v,%q), want (true,false,'账号已拥有该道具')", message, acc, prod, reason)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestFilterCooldownAttempts(t *testing.T) {
|
||||
attempts := makeAttempts("a", "b", "c")
|
||||
now := time.Now()
|
||||
|
||||
Reference in New Issue
Block a user