更新单元测试
This commit is contained in:
parent
6b6cdc78ab
commit
f2ce4b1538
|
|
@ -5,6 +5,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var access = "eW10OjkxMmU3MWE2NGI3ZjkzNzlkYWRkNWYzMzRhM2M3MjM2OTdiNjJmOTJkMThkZDY3NTNjZWI1MzMwOWIwNjE2NDg="
|
||||||
|
|
||||||
func TestBatchCreate(t *testing.T) {
|
func TestBatchCreate(t *testing.T) {
|
||||||
in := &ShortUrlBatchCreate{
|
in := &ShortUrlBatchCreate{
|
||||||
BatchName: "test_query_" + time.Now().Format("20060102150405"),
|
BatchName: "test_query_" + time.Now().Format("20060102150405"),
|
||||||
|
|
@ -17,7 +19,7 @@ func TestBatchCreate(t *testing.T) {
|
||||||
EndTimeStr: time.Now().AddDate(0, 0, 2).Format(time.DateOnly),
|
EndTimeStr: time.Now().AddDate(0, 0, 2).Format(time.DateOnly),
|
||||||
WithBatchMap: true,
|
WithBatchMap: true,
|
||||||
}
|
}
|
||||||
res, err := NewClient(WithAuth("eW10OjkxMmU3MWE2NGI3ZjkzNzlkYWRkNWYzMzRhM2M3MjM2OTdiNjJmOTJkMThkZDY3NTNjZWI1MzMwOWIwNjE2NDg=")).BatchCreate(in)
|
res, err := NewClient(WithAuth(access)).BatchCreate(in)
|
||||||
t.Log(res, err)
|
t.Log(res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -27,7 +29,7 @@ func TestBatchQuery(t *testing.T) {
|
||||||
BatchNo: 4233953069,
|
BatchNo: 4233953069,
|
||||||
}
|
}
|
||||||
|
|
||||||
queryRes, err := NewClient().BatchQuery(queryIn)
|
queryRes, err := NewClient(WithAuth(access)).BatchQuery(queryIn)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("BatchQuery failed: %v", err)
|
t.Errorf("BatchQuery failed: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue