-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi_test.go
39 lines (33 loc) · 929 Bytes
/
api_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package api
import (
"context"
"testing"
"github.com/stretchr/testify/assert"
)
var (
ctx = context.Background()
srv = New(&Config{
Key: "",
SecretKey: "",
})
)
func TestQCCService_GetCompanyGraph(t *testing.T) {
got, err := srv.GetCompanyGraph(ctx, &GetCompanyGraphReq{SearchKey: "企查查科技股份有限公司"})
assert.NoError(t, err)
t.Logf("GetCompanyGraph: %+v", got)
}
func TestQCCService_GetList(t *testing.T) {
got, err := srv.FuzzySearchGetList(ctx, &FuzzySearchGetListReq{SearchKey: "企查查科技股份有限公司"})
assert.NoError(t, err)
t.Logf("GetList: %+v", got)
}
func TestQCCService_AdminPenaltyCheckGetList(t *testing.T) {
var req = &AdminPenaltyCheckGetListReq{
SearchKey: "企查查科技股份有限公司",
PageIndex: 1,
PageSize: 10,
}
got, err := srv.AdminPenaltyCheckGetList(ctx, req)
assert.NoError(t, err)
t.Logf("AdminPenaltyCheckGetList: %+v", got)
}